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:
Christopher Michael 2007-10-02 00:16:09 +00:00
parent 522bf9d56e
commit f824ed9e9c
1 changed files with 6 additions and 4 deletions

View File

@ -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";
}
}