[gtk+/wip/baedert/drawing: 287/371] paned: Remove assertion in get_child_property
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing: 287/371] paned: Remove assertion in get_child_property
- Date: Sun, 16 Jul 2017 15:45:57 +0000 (UTC)
commit 85b657db0e7360e365e4b2ca504a049c9dc3b27b
Author: Timm Bäder <mail baedert org>
Date: Mon Jun 26 12:02:17 2017 +0200
paned: Remove assertion in get_child_property
Passing the third child (the pane separator) is possible and shouldn't
cause the process to abort.
gtk/gtkpaned.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index 463a8c8..887999f 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -965,8 +965,10 @@ gtk_paned_get_child_property (GtkContainer *container,
GtkPaned *paned = GTK_PANED (container);
GtkPanedPrivate *priv = paned->priv;
- g_assert (child == priv->child1 || child == priv->child2);
-
+ if (child != priv->child1 &&
+ child != priv->child2)
+ return;
+
switch (property_id)
{
case CHILD_PROP_RESIZE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]