ector engine: +null checking.
authorHermet Park <hermetpark@gmail.com>
Mon, 23 Sep 2019 12:12:07 +0000 (21:12 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Mon, 23 Sep 2019 21:32:19 +0000 (06:32 +0900)
Null pixels is allowed when drawing region is 0,

In that case, the pixel buffer can be destroyed earlier by vg.

@fix

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

index 072d46b..ff6af8a 100755 (executable)
@@ -4507,12 +4507,15 @@ _draw_thread_ector_surface_set(void *data)
    if (surface)
      {
         pixels = evas_cache_image_pixels(&surface->cache_entry);
-        w = surface->cache_entry.w;
-        h = surface->cache_entry.h;
-        x = ector_surface->x;
-        y = ector_surface->y;
-        // clear the surface before giving to ector
-        if (ector_surface->clear) memset(pixels, 0, (w * h * 4));
+        if (pixels)
+          {
+             w = surface->cache_entry.w;
+             h = surface->cache_entry.h;
+             x = ector_surface->x;
+             y = ector_surface->y;
+             // clear the surface before giving to ector
+             if (ector_surface->clear) memset(pixels, 0, (w * h * 4));
+          }
      }
 
    ector_buffer_pixels_set(ector_surface->ector, pixels, w, h, 0, EFL_GFX_COLORSPACE_ARGB8888, EINA_TRUE);