forked from enlightenment/efl
Be a little more paranoid about freeing image data by adding some missing
checks for valid im->cs.data and im->image->data before trying to compare them. SVN revision: 27526
This commit is contained in:
parent
3bb50b9b24
commit
90a63b2699
|
@ -267,10 +267,18 @@ evas_common_image_free(RGBA_Image *im)
|
|||
{
|
||||
im->ref--;
|
||||
if (im->ref > 0) return;
|
||||
if (im->cs.data != im->image->data)
|
||||
if ((im->cs.data) && (im->image->data))
|
||||
{
|
||||
if (im->cs.data != im->image->data)
|
||||
{
|
||||
if (!im->cs.no_free) free(im->cs.data);
|
||||
}
|
||||
}
|
||||
else if (im->cs.data)
|
||||
{
|
||||
if (!im->cs.no_free) free(im->cs.data);
|
||||
}
|
||||
|
||||
im->cs.data = NULL;
|
||||
evas_common_pipe_free(im);
|
||||
if (im->image) evas_common_image_surface_free(im->image);
|
||||
|
|
Loading…
Reference in New Issue