diff options
author | Stefan Schmidt <stefan@osg.samsung.com> | 2016-12-06 10:49:10 +0100 |
---|---|---|
committer | Stefan Schmidt <stefan@osg.samsung.com> | 2016-12-06 11:05:41 +0100 |
commit | 10fb982ac01874fa273d67a91aa4e852485b86f1 (patch) | |
tree | 8130ab4aca85a97921311f8d33f5bd92d4e0ef36 /src/modules | |
parent | 7d93a1d45f858d06815887295a8f1a40951b6da9 (diff) | |
download | efl-10fb982ac01874fa273d67a91aa4e852485b86f1.tar.gz |
evas: native_dmabuf: make sure we check for NULL before not after we dereference
Same change as just done in evas_native_tbm in commit
38dbe932db5c12f66ff2e045ac74107e149c14da.
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/evas/engines/software_generic/evas_native_dmabuf.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/modules/evas/engines/software_generic/evas_native_dmabuf.c b/src/modules/evas/engines/software_generic/evas_native_dmabuf.c index e19db5b8dc..d85e352451 100644 --- a/src/modules/evas/engines/software_generic/evas_native_dmabuf.c +++ b/src/modules/evas/engines/software_generic/evas_native_dmabuf.c @@ -19,9 +19,10 @@ _native_bind_cb(void *image, int x EINA_UNUSED, int y EINA_UNUSED, int w EINA_UN struct dmabuf_attributes *a; int size; RGBA_Image *im = image; - Native *n = im->native.data; - if (!im || !n) return; + if (!im) return; + Native *n = im->native.data; + if (!n) return; if (n->ns.type != EVAS_NATIVE_SURFACE_WL_DMABUF) return; @@ -44,9 +45,10 @@ static void _native_unbind_cb(void *image) { RGBA_Image *im = image; - Native *n = im->native.data; - if (!im || !n) return; + if (!im) return; + Native *n = im->native.data; + if (!n) return; if (n->ns.type != EVAS_NATIVE_SURFACE_WL_DMABUF) return; } @@ -55,9 +57,9 @@ static void _native_free_cb(void *image) { RGBA_Image *im = image; - Native *n = im->native.data; if (!im) return; + Native *n = im->native.data; if (im->image.data) munmap(n->ns_data.wl_surface_dmabuf.ptr, |