ector engine: +null checking.

Null pixels is allowed when drawing region is 0,

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

@fix
This commit is contained in:
Hermet Park 2019-09-23 21:12:07 +09:00
parent dd5e7c7019
commit eb2c1311ae
1 changed files with 9 additions and 6 deletions

View File

@ -4430,12 +4430,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);