[epiphany] ephy-notebook: do not assume the type of the child widget in 'remove'



commit f43a0d1c1fe3e156d49dd11b55715d1ac7215677
Author: Xan Lopez <xan igalia com>
Date:   Tue Jun 26 17:36:04 2012 +0200

    ephy-notebook: do not assume the type of the child widget in 'remove'
    
    Since commit 325cf071d1 in GTK+ the 'remove' method will be called
    also with the tab label widget, so do not assert when the type is not
    EphyEmbed, just do nothing.

 src/ephy-notebook.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 1b8eeb0..6a43412 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -764,7 +764,8 @@ ephy_notebook_remove (GtkContainer *container,
 	int position, curr;
 	EphyWebView *view;
 
-	g_assert (EPHY_IS_EMBED (tab_widget));
+	if (!EPHY_IS_EMBED (tab_widget))
+		return;
 
 	/* Remove the page from the focused pages list */
 	priv->focused_pages =  g_list_remove (priv->focused_pages, tab_widget);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]