[gtk+/wip/csd-for-review] Fix a crash when getting header bar child properties
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/csd-for-review] Fix a crash when getting header bar child properties
- Date: Mon, 11 Mar 2013 02:04:47 +0000 (UTC)
commit c15a76c6e18b1f795915b0185ce05d51f8151b68
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Mar 10 21:59:27 2013 -0400
Fix a crash when getting header bar child properties
The find_child_link call will return NULL if the child is
the label.
gtk/gtkheaderbar.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c
index 8a13a4d..9de6175 100644
--- a/gtk/gtkheaderbar.c
+++ b/gtk/gtkheaderbar.c
@@ -905,6 +905,12 @@ gtk_header_bar_get_child_property (GtkContainer *container,
Child *child;
l = find_child_link (GTK_HEADER_BAR (container), widget);
+ if (l == NULL)
+ {
+ g_param_value_set_default (pspec, value);
+ return;
+ }
+
child = l->data;
switch (property_id)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]