small fix - check surface alloc return and reurn alloc failure.

SVN revision: 59522
This commit is contained in:
Carsten Haitzler 2011-05-19 09:22:35 +00:00
parent 70665bc1c5
commit 19b70919ad
1 changed files with 5 additions and 0 deletions

View File

@ -333,6 +333,11 @@ evas_image_load_file_data_jpeg_internal(Image_Entry *ie, FILE *f, int *error)
return EINA_TRUE;
}
ptr2 = evas_cache_image_pixels(ie);
if (!ptr2)
{
*error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
return EINA_FALSE;
}
/* We handle first CMYK (4 components) */
if (cinfo.output_components == 4)