[gtk+/gtk-3-2] GtkCssProvider: don't segfault when CSS file is not found
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-2] GtkCssProvider: don't segfault when CSS file is not found
- Date: Mon, 12 Dec 2011 15:11:40 +0000 (UTC)
commit b38f5ffa52c3a07f40061479bb1a5f023e0faa67
Author: Stef Walter <stefw collabora co uk>
Date: Tue Nov 22 08:13:04 2011 +0100
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
gtk/gtkcssprovider.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index a905f1a..5733f13 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -1220,7 +1220,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
@@ -1532,7 +1532,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]