icontheme: fix crash on directories without a Context key
Backported from GTK 3 commit 21cd322df9 by Emmanuele Bassi.
This commit is contained in:
parent
6dff9147fb
commit
7dd2375e9f
1 changed files with 6 additions and 2 deletions
|
|
@ -2327,8 +2327,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 is optional */
|
||||
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 a new issue