ector: fix pointer checking

we want to check if the pointer is available, and not the value of the
pointer. This fixes some "Jump depends on uninitialized value" messages
from valgrind.
This commit is contained in:
Marcel Hollerbach 2020-03-23 11:20:56 +01:00
parent efb15f510c
commit 6934a9623e
1 changed files with 4 additions and 4 deletions

View File

@ -67,10 +67,10 @@ EOLIAN static Eina_Bool
_ector_software_buffer_base_ector_buffer_pixels_get(Eo *obj EINA_UNUSED, Ector_Software_Buffer_Base_Data *pd,
void **pixels, int* width, int* height, int* stride)
{
if (*pixels) *pixels = pd->pixels.u8;
if (*width) *width = pd->generic->w;
if (*height) *height = pd->generic->h;
if (*stride) *stride = pd->stride;
if (pixels) *pixels = pd->pixels.u8;
if (width) *width = pd->generic->w;
if (height) *height = pd->generic->h;
if (stride) *stride = pd->stride;
return pd->writable;
}