evas/engine: fix a potentional error of null deref
authorWonki Kim <wonki_.kim@samsung.com>
Wed, 5 Aug 2020 08:02:13 +0000 (17:02 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Wed, 5 Aug 2020 21:33:19 +0000 (06:33 +0900)
Summary: this is a patch to fix a potentional error by null dereferencing.

Reviewers: jsuya, bu5hm4n, Hermet

Reviewed By: jsuya, bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12091

src/modules/evas/engines/wayland_shm/evas_engine.c

index a730aea8e3317575252b23d9827313bc4a08c3cd..04f3297aebcb91fe446b5297ed352f97ef252783 100644 (file)
@@ -277,6 +277,8 @@ eng_image_native_set(void *engine EINA_UNUSED, void *image, void *native)
 
 
 
+   EINA_SAFETY_ON_NULL_RETURN_VAL(im2, im);
+
    if (im->native.data)
       {
          if (im->native.func.free)