cssvalue: Don't crash when printing NULL strings

A NULL string should be printed as "none".
This commit is contained in:
Benjamin Otte 2012-09-27 16:23:53 +02:00
parent 5e1ae36b2f
commit 94c0c1542b

View File

@ -65,6 +65,12 @@ gtk_css_value_string_print (const GtkCssValue *value,
char *string = value->string;
gsize len;
if (string == NULL)
{
g_string_append (str, "none");
return;
}
g_string_append_c (str, '"');
do {