[gtk/inspector-layout] inspector: Avoid a critical
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/inspector-layout] inspector: Avoid a critical
- Date: Fri, 5 Apr 2019 19:45:20 +0000 (UTC)
commit cb3d61bb0e305c759fa429e509eb85eb7752b4a7
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Apr 5 19:44:16 2019 +0000
inspector: Avoid a critical
If a layout manager does not have layout children,
quietly hide the layout page.
gtk/inspector/prop-list.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gtk/inspector/prop-list.c b/gtk/inspector/prop-list.c
index 60096bbc65..97edae10fc 100644
--- a/gtk/inspector/prop-list.c
+++ b/gtk/inspector/prop-list.c
@@ -528,6 +528,9 @@ gtk_inspector_prop_list_set_layout_child (GtkInspectorPropList *pl,
if (!layout_manager)
return;
+ if (GTK_LAYOUT_MANAGER_GET_CLASS (layout_manager)->layout_child_type == G_TYPE_INVALID)
+ return;
+
layout_child = gtk_layout_manager_get_layout_child (layout_manager, GTK_WIDGET (object));
if (!layout_child)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]