cssprovider: Handle non-existing section

Otherwise we'll get warnings on errors when CSS debug is disabled.
This commit is contained in:
Benjamin Otte 2012-11-15 19:18:19 +01:00
parent 18fdc975be
commit 4bc264a514

View File

@ -1825,9 +1825,12 @@ gtk_css_provider_propagate_error (GtkCssProvider *provider,
return;
*propagate_to = g_error_copy (error);
s = _gtk_css_section_to_string (section);
g_prefix_error (propagate_to, "%s", s);
g_free (s);
if (section)
{
s = _gtk_css_section_to_string (section);
g_prefix_error (propagate_to, "%s", s);
g_free (s);
}
}
static gboolean