summaryrefslogtreecommitdiff
path: root/gtk/gtknotebook.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2015-05-26 16:26:59 +0200
committerCarlos Garnacho <carlosg@gnome.org>2015-05-26 18:05:36 +0200
commit3e60650fa8479d507b31965d09ee521ba4e91182 (patch)
treeb5d9f46f56576ce7c246fa2935c9a0d130cdb5c4 /gtk/gtknotebook.c
parent6724ea133123f1a04eeb7b834b7f8f05dda8594c (diff)
downloadgtk+-3e60650fa8479d507b31965d09ee521ba4e91182.tar.gz
notebook: Fix assert in ::drag-motion
The drag destination might be empty, we shouldn't be checking whether it contains pages at all. Instead, check the source notebook, which ought to have a selected page if you're dragging something from there. https://bugzilla.gnome.org/show_bug.cgi?id=749893
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r--gtk/gtknotebook.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index ef27191387..9edb66c3af 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -3829,8 +3829,6 @@ gtk_notebook_drag_motion (GtkWidget *widget,
goto out;
}
- g_assert (priv->cur_page != NULL);
-
stop_scrolling (notebook);
target = gtk_drag_dest_find_target (widget, context, NULL);
tab_target = gdk_atom_intern_static_string ("GTK_NOTEBOOK_TAB");
@@ -3844,6 +3842,7 @@ gtk_notebook_drag_motion (GtkWidget *widget,
retval = TRUE;
source = GTK_NOTEBOOK (gtk_drag_get_source_widget (context));
+ g_assert (source->priv->cur_page != NULL);
source_child = source->priv->cur_page->child;
group = notebook->priv->group;