Don't dereference a NULL error

This was pointed out in bug 595790.
This commit is contained in:
Matthias Clasen 2009-09-20 22:39:13 -04:00
parent 2e8b6757b1
commit 5ed8cf50b8

View File

@ -1500,9 +1500,10 @@ render_icon_name_pixbuf (GtkIconSource *icon_source,
if (!tmp_pixbuf)
{
g_warning ("Error loading theme icon '%s' for stock: %s",
icon_source->source.icon_name, error->message);
g_error_free (error);
g_warning ("Error loading theme icon '%s' for stock: %s",
icon_source->source.icon_name, error ? error->message : "");
if (error)
g_error_free (error);
return NULL;
}