forked from enlightenment/efl
evas-software-x11: Fix dereference before null check(s)
Summary: This fixes Coverity CID1270028, CID1270029, CID1270030 where variables RGBA_Image and Native where dereferencing function input paramaters Before null checking them. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
2a7640cb4e
commit
1438a980dd
|
@ -214,10 +214,12 @@ _evas_video_nv12(unsigned char *evas_data, const unsigned char *source_data, uns
|
|||
static void
|
||||
_native_bind_cb(void *data EINA_UNUSED, void *image, int x EINA_UNUSED, int y EINA_UNUSED, int w EINA_UNUSED, int h EINA_UNUSED)
|
||||
{
|
||||
RGBA_Image *im = image;
|
||||
Native *n = im->native.data;
|
||||
RGBA_Image *im;
|
||||
Native *n;
|
||||
|
||||
if (!im) return;
|
||||
if (!(im = image)) return;
|
||||
|
||||
n = im->native.data;
|
||||
if ((n) && (n->ns.type == EVAS_NATIVE_SURFACE_TBM))
|
||||
{
|
||||
tbm_surface_info_s info;
|
||||
|
@ -231,10 +233,12 @@ _native_bind_cb(void *data EINA_UNUSED, void *image, int x EINA_UNUSED, int y EI
|
|||
static void
|
||||
_native_unbind_cb(void *data EINA_UNUSED, void *image)
|
||||
{
|
||||
RGBA_Image *im = image;
|
||||
Native *n = im->native.data;
|
||||
RGBA_Image *im;
|
||||
Native *n;
|
||||
|
||||
if (!im) return;
|
||||
if (!(im = image)) return;
|
||||
|
||||
n = im->native.data;
|
||||
if ((n) && (n->ns.type == EVAS_NATIVE_SURFACE_TBM))
|
||||
{
|
||||
sym_tbm_surface_unmap(n->ns.data.tbm.buffer);
|
||||
|
@ -244,10 +248,13 @@ _native_unbind_cb(void *data EINA_UNUSED, void *image)
|
|||
static void
|
||||
_native_free_cb(void *data EINA_UNUSED, void *image)
|
||||
{
|
||||
RGBA_Image *im = image;
|
||||
Native *n = im->native.data;
|
||||
RGBA_Image *im;
|
||||
Native *n;
|
||||
|
||||
if (!(im = image)) return;
|
||||
|
||||
n = im->native.data;
|
||||
|
||||
if (!im) return;
|
||||
im->native.data = NULL;
|
||||
im->native.func.bind = NULL;
|
||||
im->native.func.unbind = NULL;
|
||||
|
|
Loading…
Reference in New Issue