forked from enlightenment/efl
on data load alloc surface only if dimensiosn match
SVN revision: 49329
This commit is contained in:
parent
5f03706efa
commit
2cf09cdc4a
|
@ -533,6 +533,11 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key
|
|||
goto close_file;
|
||||
}
|
||||
|
||||
if ((w != ie->w) || (h != ie->h))
|
||||
{
|
||||
*error = EVAS_LOAD_ERROR_GENERIC;
|
||||
goto close_file;
|
||||
}
|
||||
evas_cache_image_surface_alloc(ie, w, h);
|
||||
surface = evas_cache_image_pixels(ie);
|
||||
if (!surface)
|
||||
|
@ -540,11 +545,6 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key
|
|||
*error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
|
||||
goto close_file;
|
||||
}
|
||||
if ((w != ie->w) || (h != ie->h))
|
||||
{
|
||||
*error = EVAS_LOAD_ERROR_GENERIC;
|
||||
goto close_file;
|
||||
}
|
||||
|
||||
if (bit_count < 16)
|
||||
{
|
||||
|
@ -1080,8 +1080,6 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key
|
|||
}
|
||||
else
|
||||
goto close_file;
|
||||
|
||||
if (hasa) ie->flags.alpha = 1;
|
||||
|
||||
if (buffer) free(buffer);
|
||||
E_FCLOSE(f);
|
||||
|
|
Loading…
Reference in New Issue