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
This commit is contained in:
Carsten Haitzler 2017-07-23 19:42:06 +09:00
parent a91d0b2ea4
commit 17d33c7138
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}