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
This commit is contained in:
Benjamin Otte 2015-10-10 23:21:45 +02:00
parent 74e02842bb
commit bddc524cd8

View File

@ -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;