mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 06:10:15 +00:00
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
This commit is contained in:
parent
6724ea1331
commit
3e60650fa8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user