ector: don't alloc memory if the size is 0.
authorHermet Park <hermetpark@gmail.com>
Wed, 11 Sep 2019 03:00:28 +0000 (12:00 +0900)
committerYeongjong Lee <yj34.lee@samsung.com>
Mon, 16 Sep 2019 01:23:00 +0000 (10:23 +0900)
src/lib/ector/software/ector_software_buffer.c

index b894f4c..5a5c940 100644 (file)
@@ -96,7 +96,7 @@ _ector_software_buffer_base_ector_buffer_pixels_set(Eo *obj, Ector_Software_Buff
         pd->nofree = EINA_TRUE;
         pd->writable = !!writable;
      }
-   else
+   else if (stride > 0 && height > 0)
      {
         pd->pixels.u8 = calloc(stride * height, 1);
         pd->nofree = EINA_FALSE;