forked from enlightenment/efl
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:
parent
efb15f510c
commit
6934a9623e
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue