raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=17d33c71381a6a8cf92fc4146c2ea611bb322ec2

commit 17d33c71381a6a8cf92fc4146c2ea611bb322ec2
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Sun Jul 23 19:42:06 2017 +0900

    efl ui grid - handle invalid 0x0 fully if the grid size fails to do it
    
    if efl_pack_grid_size_set is overridden and somehow allows 0x0 to
    still happen then handle this caase and skip the layout.
    
    fix CID 1374317
---
 src/lib/elementary/efl_ui_grid_static.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_grid_static.c 
b/src/lib/elementary/efl_ui_grid_static.c
index 352d5c58e7..77485180cc 100644
--- a/src/lib/elementary/efl_ui_grid_static.c
+++ b/src/lib/elementary/efl_ui_grid_static.c
@@ -48,6 +48,7 @@ _efl_ui_grid_static_efl_pack_layout_layout_update(Eo *obj, 
void *_pd EINA_UNUSED
      {
         WRN("Grid.Static size must be set before using! Default to 100x100.");
         efl_pack_grid_size_set(obj, 100, 100);
+        if (!gd->req_cols || !gd->req_rows) goto err;
      }
    vwl = gd->req_cols;
    vhl = gd->req_rows;
@@ -71,7 +72,7 @@ _efl_ui_grid_static_efl_pack_layout_layout_update(Eo *obj, 
void *_pd EINA_UNUSED
         efl_gfx_position_set(gi->object, x1, y1);
         efl_gfx_size_set(gi->object, x2 - x1, y2 - y1);
      }
-
+err:
    efl_event_thaw(e);
 }
 

-- 


Reply via email to