GtkCssProvider: don't segfault when CSS file is not found

* Fix null dereference in gtk_css_provider_take_error()
 * And another in gtk_css_provider_emit_error()

https://bugzilla.gnome.org/show_bug.cgi?id=664537
This commit is contained in:
Stef Walter 2011-11-22 08:13:04 +01:00 committed by Matthias Clasen
parent 9b967ab8af
commit d462f86aad

View File

@ -1230,7 +1230,7 @@ gtk_css_provider_emit_error (GtkCssProvider *provider,
const GError *error)
{
g_signal_emit (provider, css_provider_signals[PARSING_ERROR], 0,
scanner->section, error);
scanner != NULL ? scanner->section : NULL, error);
}
static void
@ -1542,7 +1542,7 @@ gtk_css_provider_take_error (GtkCssProvider *provider,
GtkCssScanner *scanner,
GError *error)
{
gtk_css_provider_emit_error (scanner->provider,
gtk_css_provider_emit_error (provider,
scanner,
error);