From 0570683de1c08cdbf824cd550fda7493fc5c9650 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Tue, 19 Jul 2016 14:36:41 +0900 Subject: [PATCH] evas: Avoid proxy subrender if size is 0 See also D4159. This is an alternative to the proposed patch. Fixes T3949 (I hope!) Change-Id: Id227b4bbb5886b42a5c8b80be4fed8aa74b48d4a Signed-off-by: Mykyta Biliavskyi --- src/lib/evas/canvas/evas_render.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index 94f5503..a06ccf8 100755 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -1873,7 +1873,7 @@ evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_ w = source->cur->geometry.w; h = source->cur->geometry.h; - RD(level, " proxy_subrender(source: %p, proxy: %p)\n", source, proxy_obj); + RD(level, " proxy_subrender(source: %p, proxy: %p, %dx%d)\n", source, proxy_obj, w, h); EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, source->proxy, Evas_Object_Proxy_Data, proxy_write) @@ -1893,6 +1893,7 @@ evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_ /* FIXME (cont): Should see if the object has alpha */ if (!proxy_write->surface) { + if ((w < 1) || (h < 1)) goto end; proxy_write->surface = ENFN->image_map_surface_new(ENDT, w, h, 1); RD(level, " created surface: %p %dx%d\n", proxy_write->surface, w, h); if (!proxy_write->surface) goto end; -- 2.7.4