diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 32cdee71ee..231893f74c 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -4958,7 +4958,10 @@ gtk_notebook_real_remove (GtkNotebook *notebook, gtk_widget_unparent (page->child); tab_label = page->tab_label; - if (tab_label) + /* Do not unparent the tab label if it's already in another + hierarchy. It means we are in the middle of a DnD and it's + already taken care of. */ + if (tab_label && NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page)) { g_object_ref (tab_label); gtk_notebook_remove_tab_label (notebook, page);