]> git.0d.be Git - empathy.git/commitdiff
individual_grid_destroy: remove the ChamplainEmbedView from its container
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 11 Oct 2011 22:25:53 +0000 (18:25 -0400)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 22 Dec 2011 12:31:04 +0000 (13:31 +0100)
The EmpathyIndividualWidget object is re-used for tooltips so we should remove
the ChamplainEmbedView before trying to add a new one.

https://bugzilla.gnome.org/show_bug.cgi?id=661500

libempathy-gtk/empathy-individual-widget.c

index 5a1c559d13229262613f68d6ee7005dd7cce29ff..cba2784776ef1efebb4d7249643ab4059e615367 100644 (file)
@@ -1675,6 +1675,17 @@ individual_grid_destroy (EmpathyIndividualWidget *self)
 
   gtk_container_remove (GTK_CONTAINER (priv->vbox_individual),
       GTK_WIDGET (priv->individual_grid));
 
   gtk_container_remove (GTK_CONTAINER (priv->vbox_individual),
       GTK_WIDGET (priv->individual_grid));
+
+#ifdef HAVE_LIBCHAMPLAIN
+  if (priv->map_view_embed != NULL)
+    {
+      gtk_container_remove (GTK_CONTAINER (priv->viewport_map),
+          priv->map_view_embed);
+
+      priv->map_view_embed = NULL;
+    }
+#endif
+
   priv->individual_grid = NULL;
 }
 
   priv->individual_grid = NULL;
 }