diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2017-07-23 19:42:06 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2017-07-23 19:42:06 +0900 |
commit | 17d33c71381a6a8cf92fc4146c2ea611bb322ec2 (patch) | |
tree | 99674ad4d21a4f6ea975a6aa57a9105bbed7457d | |
parent | a91d0b2ea4fc0dc0136405a70f623dde50d6cc82 (diff) | |
download | efl-17d33c71381a6a8cf92fc4146c2ea611bb322ec2.tar.gz |
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
-rw-r--r-- | src/lib/elementary/efl_ui_grid_static.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |