From b1d5de78e1f73f26f741d6c6043a644889c3008f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 4 Feb 2020 22:42:44 +0100 Subject: [PATCH] notebook: Don't trigger criticals in dispose When we dismantle our children in dispose, we trigger a11y children-changed signals which end up calling back into the notebook. Handle this without critical warnings. --- gtk/gtknotebook.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 73486d71fb..b3feea7fe3 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -6544,7 +6544,8 @@ gtk_notebook_get_tab_label (GtkNotebook *notebook, g_return_val_if_fail (GTK_IS_WIDGET (child), NULL); list = gtk_notebook_find_child (notebook, child); - g_return_val_if_fail (list != NULL, NULL); + if (list == NULL) + return NULL; if (GTK_NOTEBOOK_PAGE_FROM_LIST (list)->default_tab) return NULL; -- 2.30.2