[gtk+/gtk-3-18] stylecontext: Make sure style is valid when looking up style properties
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-18] stylecontext: Make sure style is valid when looking up style properties
- Date: Mon, 12 Oct 2015 17:27:20 +0000 (UTC)
commit 83427240220c0fb412140a169560516a1edcc250
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 9176c02..f8822c1 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -1621,6 +1621,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]