[gtk+] cssvalue: Handle named colors not resolving
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] cssvalue: Handle named colors not resolving
- Date: Fri, 29 Mar 2013 12:30:05 +0000 (UTC)
commit c25d8e3aea900f8ae2abd2907a5b8a2e89e7ee9e
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]