[gtk+] stylecontext: Make sure style is valid when looking up style properties
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] stylecontext: Make sure style is valid when looking up style properties
- Date: Sat, 10 Oct 2015 21:24:43 +0000 (UTC)
commit bddc524cd84b76d1c25c7700eca9d3a25db30cf6
Author: Benjamin Otte <otte redhat com>
Date: Sat Oct 10 23:21:45 2015 +0200
stylecontext: Make sure style is valid when looking up style properties
Otherwise, the validation may happen vey automatically some time during
the style property and that will most likely cause a crash.
https://bugzilla.gnome.org/show_bug.cgi?id=756338
gtk/gtkstylecontext.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 0217d55..5d059a0 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -1557,6 +1557,9 @@ _gtk_style_context_peek_style_property (GtkStyleContext *context,
priv = context->priv;
+ /* ensure the style cache is valid by forcing a validation */
+ gtk_style_context_lookup_style (context);
+
key.widget_type = widget_type;
key.pspec = pspec;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]