From 57a49aae1602c57dceb7ce017d86be8908b5d32e Mon Sep 17 00:00:00 2001 From: Padraig O'Briain Date: Mon, 10 Sep 2001 12:23:49 +0000 Subject: [PATCH] gtk/gtkstyle.c (_gtk_style_peek_property_value) Amend previous change to * gtk/gtkstyle.c (_gtk_style_peek_property_value) Amend previous change to avoid runtime error in g_param_spec_ref() --- ChangeLog | 5 +++++ ChangeLog.pre-2-0 | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-2 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtkstyle.c | 5 +++-- 8 files changed, 38 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2920f5c41..37dc477390 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-09-10 Padraig O'Briain + + * gtk/gtkstyle.c (_gtk_style_peek_property_value) + Amend previous change to avoid runtime error in g_param_spec_ref() + Mon Sep 10 06:58:56 2001 Owen Taylor * gtk/gtkrc.c (insert_rc_property): Fix blank line diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index f2920f5c41..37dc477390 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +2001-09-10 Padraig O'Briain + + * gtk/gtkstyle.c (_gtk_style_peek_property_value) + Amend previous change to avoid runtime error in g_param_spec_ref() + Mon Sep 10 06:58:56 2001 Owen Taylor * gtk/gtkrc.c (insert_rc_property): Fix blank line diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f2920f5c41..37dc477390 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2001-09-10 Padraig O'Briain + + * gtk/gtkstyle.c (_gtk_style_peek_property_value) + Amend previous change to avoid runtime error in g_param_spec_ref() + Mon Sep 10 06:58:56 2001 Owen Taylor * gtk/gtkrc.c (insert_rc_property): Fix blank line diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index f2920f5c41..37dc477390 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +2001-09-10 Padraig O'Briain + + * gtk/gtkstyle.c (_gtk_style_peek_property_value) + Amend previous change to avoid runtime error in g_param_spec_ref() + Mon Sep 10 06:58:56 2001 Owen Taylor * gtk/gtkrc.c (insert_rc_property): Fix blank line diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index f2920f5c41..37dc477390 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +2001-09-10 Padraig O'Briain + + * gtk/gtkstyle.c (_gtk_style_peek_property_value) + Amend previous change to avoid runtime error in g_param_spec_ref() + Mon Sep 10 06:58:56 2001 Owen Taylor * gtk/gtkrc.c (insert_rc_property): Fix blank line diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f2920f5c41..37dc477390 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2001-09-10 Padraig O'Briain + + * gtk/gtkstyle.c (_gtk_style_peek_property_value) + Amend previous change to avoid runtime error in g_param_spec_ref() + Mon Sep 10 06:58:56 2001 Owen Taylor * gtk/gtkrc.c (insert_rc_property): Fix blank line diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f2920f5c41..37dc477390 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2001-09-10 Padraig O'Briain + + * gtk/gtkstyle.c (_gtk_style_peek_property_value) + Amend previous change to avoid runtime error in g_param_spec_ref() + Mon Sep 10 06:58:56 2001 Owen Taylor * gtk/gtkrc.c (insert_rc_property): Fix blank line diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index 8c90bf89b6..18040214d0 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -1300,13 +1300,14 @@ _gtk_style_peek_property_value (GtkStyle *style, g_return_val_if_fail (g_type_is_a (pspec->owner_type, GTK_TYPE_WIDGET), NULL); g_return_val_if_fail (g_type_is_a (widget_type, pspec->owner_type), NULL); + key.widget_type = widget_type; + key.pspec = pspec; + /* need value cache array */ if (!style->property_cache) style->property_cache = g_array_new (FALSE, FALSE, sizeof (PropertyValue)); else { - key.widget_type = widget_type; - key.pspec = pspec; pcache = bsearch (&key, style->property_cache->data, style->property_cache->len, sizeof (PropertyValue), style_property_values_cmp);