summaryrefslogtreecommitdiff
path: root/src/lib/evas/common
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-10-05 16:02:47 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-10-05 16:02:47 -0700
commit08deba98f864eb26271ddbb4d7d530e1bcd800c9 (patch)
tree9bfaf7ba8cd94dffa1149226d2bd0b938528141e /src/lib/evas/common
parent8f3e860e8e45931f1f4b7b9cf058f10d862d5944 (diff)
evas: make sure we always open the file and look at its header before trying to load data.
Diffstat (limited to 'src/lib/evas/common')
-rw-r--r--src/lib/evas/common/evas_image_load.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/evas/common/evas_image_load.c b/src/lib/evas/common/evas_image_load.c
index b871bfe7c8..0ea6a582d6 100644
--- a/src/lib/evas/common/evas_image_load.c
+++ b/src/lib/evas/common/evas_image_load.c
@@ -420,7 +420,7 @@ evas_common_load_rgba_image_data_from_file(Image_Entry *ie)
420 evas_image_load_func = ie->info.loader; 420 evas_image_load_func = ie->info.loader;
421 evas_module_use(ie->info.module); 421 evas_module_use(ie->info.module);
422 422
423 if (!ie->f) 423 if (!ie->loader_data)
424 { 424 {
425 Evas_Module *em = ie->info.module; 425 Evas_Module *em = ie->info.module;
426 426
@@ -451,7 +451,7 @@ end:
451 ie->info.module = em; 451 ie->info.module = em;
452 } 452 }
453 } 453 }
454 if ((!ie->f) || (!ie->info.module)) 454 if ((!ie->f) || (!ie->info.module) || (!ie->loader_data))
455 { 455 {
456 ie->load_failed = 1; 456 ie->load_failed = 1;
457 return EVAS_LOAD_ERROR_DOES_NOT_EXIST; 457 return EVAS_LOAD_ERROR_DOES_NOT_EXIST;