[glade] Added return if fail warning
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] Added return if fail warning
- Date: Fri, 7 Nov 2014 08:20:18 +0000 (UTC)
commit 9d373e1293443854bf1f0baa1290bc6fc8d202d4
Author: Tristan Van Berkom <tristan upstairslabs com>
Date: Fri Nov 7 17:12:07 2014 +0900
Added return if fail warning
In glade_gtk_container_replace_child(), warn if the passed 'current' widget
is not a direct child of 'container'.
plugins/gtk+/glade-gtk-container.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/plugins/gtk+/glade-gtk-container.c b/plugins/gtk+/glade-gtk-container.c
index 6064ea7..0c92e83 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]