efl header skip with preload - fix seg on invalid file

for invalid files we didn't handle this case, so fix it - recent
commit/feature add.
This commit is contained in:
Carsten Haitzler 2017-01-04 20:18:42 +09:00
parent b68280bd85
commit 309e490bc0
1 changed files with 2 additions and 2 deletions

View File

@ -450,12 +450,12 @@ evas_common_load_rgba_image_data_from_file(Image_Entry *ie)
end: end:
if (ie->info.module != em) if (ie->info.module != em)
{ {
evas_module_ref(em); if (em) evas_module_ref(em);
evas_module_unref(ie->info.module); evas_module_unref(ie->info.module);
ie->info.module = em; ie->info.module = em;
} }
} }
if (!ie->f) return EVAS_LOAD_ERROR_DOES_NOT_EXIST; if ((!ie->f) || (!ie->info.module)) return EVAS_LOAD_ERROR_DOES_NOT_EXIST;
if ((ie->file) && (stat(ie->file, &st) == 0)) if ((ie->file) && (stat(ie->file, &st) == 0))
_timestamp_build(&(ie->tstamp), &st); _timestamp_build(&(ie->tstamp), &st);