[gtk/matthiasc/for-master-2: 8/16] notebook: Don't trigger criticals in dispose
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master-2: 8/16] notebook: Don't trigger criticals in dispose
- Date: Wed, 5 Feb 2020 06:04:20 +0000 (UTC)
commit b1d5de78e1f73f26f741d6c6043a644889c3008f
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Feb 4 22:42:44 2020 +0100
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]