forked from AuroraMiddleware/gtk
Do not crash when icon themes do not have a context
The Context key is not mandatory, so we need to handle its absence. Fixes: #2111
This commit is contained in:
parent
9e72ec1c8a
commit
21cd322df9
@ -3204,8 +3204,12 @@ theme_list_contexts (IconTheme *theme,
|
||||
{
|
||||
dir = l->data;
|
||||
|
||||
context = g_quark_to_string (dir->context);
|
||||
g_hash_table_replace (contexts, (gpointer) context, NULL);
|
||||
/* The "Context" key can be unset */
|
||||
if (dir->context != 0)
|
||||
{
|
||||
context = g_quark_to_string (dir->context);
|
||||
g_hash_table_replace (contexts, (gpointer) context, NULL);
|
||||
}
|
||||
|
||||
l = l->next;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user