summaryrefslogtreecommitdiff
path: root/gtk/gtkcssprovider.c
diff options
context:
space:
mode:
authorStef Walter <stefw@collabora.co.uk>2011-11-22 08:13:04 +0100
committerMatthias Clasen <mclasen@redhat.com>2011-11-30 00:23:07 -0500
commitd462f86aad94a3c5fbd9377a6ea57f731f4d0c0b (patch)
treeac4fd2556244b2f42b5dae8f4da07895831c1843 /gtk/gtkcssprovider.c
parent9b967ab8aff46b79494d75a3129fa8780545ecd1 (diff)
downloadgtk+-d462f86aad94a3c5fbd9377a6ea57f731f4d0c0b.tar.gz
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
Diffstat (limited to 'gtk/gtkcssprovider.c')
-rw-r--r--gtk/gtkcssprovider.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 1b993ec9fd..1ac52bc533 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -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);