summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan@upstairslabs.com>2014-11-07 17:12:07 +0900
committerTristan Van Berkom <tristan@upstairslabs.com>2014-11-07 17:19:27 +0900
commit9d373e1293443854bf1f0baa1290bc6fc8d202d4 (patch)
tree16906a25800a5a0a50ab9d952d77cd4551a70015
parent3f5e029817028334b349d80b7286d79426dff43c (diff)
downloadglade-9d373e1293443854bf1f0baa1290bc6fc8d202d4.tar.gz
Added return if fail warning
In glade_gtk_container_replace_child(), warn if the passed 'current' widget is not a direct child of 'container'.
-rw-r--r--plugins/gtk+/glade-gtk-container.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/gtk+/glade-gtk-container.c b/plugins/gtk+/glade-gtk-container.c
index 6064ea7e..0c92e838 100644
--- a/plugins/gtk+/glade-gtk-container.c
+++ b/plugins/gtk+/glade-gtk-container.c
@@ -97,8 +97,7 @@ glade_gtk_container_replace_child (GladeWidgetAdaptor * adaptor,
guint nproperties;
guint i;
- if (gtk_widget_get_parent (current) != container)
- return;
+ g_return_if_fail (gtk_widget_get_parent (current) == container);
param_spec = gtk_container_class_list_child_properties
(G_OBJECT_GET_CLASS (container), &nproperties);