ector: don't alloc memory if the size is 0.

This commit is contained in:
Hermet Park 2019-09-11 12:00:28 +09:00
parent ba51e55ac1
commit 470e7dd9fd
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ _ector_software_buffer_base_ector_buffer_pixels_set(Eo *obj, Ector_Software_Buff
pd->nofree = EINA_TRUE;
pd->writable = !!writable;
}
else
else if (stride > 0 && height > 0)
{
pd->pixels.u8 = calloc(stride * height, 1);
pd->nofree = EINA_FALSE;