mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
cssprovider: Don't add empty rulesets
This change was lost during the parser changes, but the newly added test exposes it. And fix the expected error, the syntax has changed.
This commit is contained in:
parent
fd1630e049
commit
7523a3f2f2
@ -631,6 +631,12 @@ css_provider_commit (GtkCssProvider *css_provider,
|
||||
GtkCssProviderPrivate *priv = gtk_css_provider_get_instance_private (css_provider);
|
||||
GSList *l;
|
||||
|
||||
if (ruleset->styles == NULL)
|
||||
{
|
||||
g_slist_free_full (selectors, (GDestroyNotify) _gtk_css_selector_free);
|
||||
return;
|
||||
}
|
||||
|
||||
for (l = selectors; l; l = l->next)
|
||||
{
|
||||
GtkCssRuleset new;
|
||||
|
@ -1 +1 @@
|
||||
border-crash-3.24.css:3: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
|
||||
border-crash-3.24.css:3:3-10: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
|
Loading…
Reference in New Issue
Block a user