evas: Avoid proxy subrender if size is 0 32/90632/2
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 19 Jul 2016 05:36:41 +0000 (14:36 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Tue, 4 Oct 2016 09:08:41 +0000 (02:08 -0700)
See also D4159. This is an alternative to the proposed patch.

Fixes T3949 (I hope!)

Change-Id: Id227b4bbb5886b42a5c8b80be4fed8aa74b48d4a
Signed-off-by: Mykyta Biliavskyi <m.biliavskyi@samsung.com>
src/lib/evas/canvas/evas_render.c

index 94f5503..a06ccf8 100755 (executable)
@@ -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;