diff options
author | Benjamin Otte <otte@redhat.com> | 2015-10-28 19:35:23 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2015-10-28 19:37:27 +0100 |
commit | a58d8bdcbc291818ce70cf3e3fcb93e762ca9c36 (patch) | |
tree | 5e998eeab03d0dd4ea1cd946fc5ab483f2f7f49d /gtk/gtkcssprovider.c | |
parent | c4eb14eb01d5d17541fb320a9c464132e5fb6904 (diff) | |
download | gtk+-a58d8bdcbc291818ce70cf3e3fcb93e762ca9c36.tar.gz |
cssprovider: Have a section when parsing style properties
Signal handlers expect a section to be present, so provide them with
one.
New testcase included.
https://bugzilla.gnome.org/show_bug.cgi?id=757240
Diffstat (limited to 'gtk/gtkcssprovider.c')
-rw-r--r-- | gtk/gtkcssprovider.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index 18a2c9c12d..50108c39e5 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -1740,7 +1740,11 @@ gtk_css_provider_get_style_property (GtkStyleProvider *provider, val->section, val->section != NULL ? gtk_css_section_get_file (val->section) : NULL, val->value); + if (!val->section) + gtk_css_scanner_push_section (scanner, GTK_CSS_SECTION_VALUE); found = _gtk_css_style_funcs_parse_value (value, scanner->parser); + if (!val->section) + gtk_css_scanner_pop_section (scanner, GTK_CSS_SECTION_VALUE); gtk_css_scanner_destroy (scanner); break; } |