forked from enlightenment/efl
Fix segv correctly
There should be no key starting with efreet in the cache, but make sure a theme exists before adding to the theme list. SVN revision: 56838
This commit is contained in:
parent
8b90ca9676
commit
88efa51928
|
@ -685,12 +685,6 @@ efreet_cache_icon_theme_name_list(int *num)
|
|||
memmove(&keys[i], &keys[i + 1], (*num - i - 1) * sizeof(char *));
|
||||
(*num)--;
|
||||
}
|
||||
/* this fixes segv of e's icon theme chooser. FIXME is this a not intended case?*/
|
||||
else if (!strncmp(keys[i], "efreet", 6) && (i < (*num + 1)))
|
||||
{
|
||||
memmove(&keys[i], &keys[i + 1], (*num - i - 1) * sizeof(char *));
|
||||
(*num)--;
|
||||
}
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
|
|
@ -237,6 +237,7 @@ efreet_icon_theme_list_get(void)
|
|||
Efreet_Icon_Theme *theme;
|
||||
|
||||
theme = efreet_icon_theme_find(keys[i]);
|
||||
if (theme)
|
||||
list = eina_list_append(list, theme);
|
||||
}
|
||||
free(keys);
|
||||
|
|
Loading…
Reference in New Issue