[gtk+/gtk-3-8] cssvalue: Handle named colors not resolving
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-8] cssvalue: Handle named colors not resolving
- Date: Fri, 29 Mar 2013 12:15:57 +0000 (UTC)
commit 450f9c6d1dedc208389cd231fe3b4d9fe17f4f7c
Author: Benjamin Otte <otte redhat com>
Date: Thu Mar 28 22:52:30 2013 +0100
cssvalue: Handle named colors not resolving
If a named color references a nonexistant named color, we didn't catch
that error and ended up crashing on a NULL-dereference.
This crashed Boxes, because its CSS referenced values from the theme
that didn't exist in any theme.
gtk/gtkcsscolorvalue.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcsscolorvalue.c b/gtk/gtkcsscolorvalue.c
index 9ff0a05..64933bd 100644
--- a/gtk/gtkcsscolorvalue.c
+++ b/gtk/gtkcsscolorvalue.c
@@ -166,6 +166,8 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
return NULL;
value = _gtk_css_color_value_resolve (named, provider, current, current_deps, dependencies);
+ if (value == NULL)
+ return NULL;
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]