forked from enlightenment/enlightenment
This should fix the random e_fm segfaults when opening directories for good.
Seems we cannot rely on icon smart data being valid. SVN revision: 31924
This commit is contained in:
parent
522bf9d56e
commit
f824ed9e9c
|
@ -1102,7 +1102,7 @@ e_fm2_icon_get(Evas *evas, E_Fm2_Icon *ic,
|
|||
}
|
||||
else
|
||||
{
|
||||
if ((ic->info.mime) && (ic->info.file) && (ic->sd->realpath))
|
||||
if ((ic->info.mime) && (ic->info.file))
|
||||
{
|
||||
const char *icon;
|
||||
|
||||
|
@ -1110,8 +1110,9 @@ e_fm2_icon_get(Evas *evas, E_Fm2_Icon *ic,
|
|||
if (!strcmp(icon, "DESKTOP"))
|
||||
{
|
||||
Efreet_Desktop *ef;
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->info.file);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/%s",
|
||||
e_fm2_real_path_get(ic->info.fm), ic->info.file);
|
||||
ef = efreet_desktop_new(buf);
|
||||
if (ef) oic = e_util_desktop_icon_add(ef, "48x48", evas);
|
||||
if (type_ret) *type_ret = "DESKTOP";
|
||||
|
@ -1122,7 +1123,8 @@ e_fm2_icon_get(Evas *evas, E_Fm2_Icon *ic,
|
|||
{
|
||||
/* theme icon */
|
||||
oic = edje_object_add(evas);
|
||||
e_util_edje_icon_set(oic, ic->info.icon);
|
||||
if (ic->info.icon)
|
||||
e_util_edje_icon_set(oic, ic->info.icon);
|
||||
if (type_ret) *type_ret = "THEME_ICON";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue