forked from enlightenment/efl
efl_ui_position_manager_grid: honor NULL objects
its sometimes possible that there is a NULL object returned by the batch call. We should not just access the NULL element. Additionally, if NULL was returned during visibility setting, we need to set visibility here. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D9827
This commit is contained in:
parent
36eff7ed82
commit
a26efaeb57
|
@ -302,8 +302,12 @@ _position_items_vertical(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data
|
|||
{
|
||||
_place_grid_item(&geom, pd, x, y);
|
||||
}
|
||||
|
||||
efl_gfx_entity_geometry_set(obj_buffer[buffer_id].entity, geom);
|
||||
Efl_Gfx_Entity *item = obj_buffer[buffer_id].entity;
|
||||
if (item)
|
||||
{
|
||||
efl_gfx_entity_geometry_set(item, geom);
|
||||
efl_gfx_entity_visible_set(item, EINA_TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -369,7 +373,12 @@ _position_items_horizontal(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Dat
|
|||
{
|
||||
_place_grid_item(&geom, pd, x, y);
|
||||
}
|
||||
efl_gfx_entity_geometry_set(obj_buffer[buffer_id].entity, geom);
|
||||
Efl_Gfx_Entity *item = obj_buffer[buffer_id].entity;
|
||||
if (item)
|
||||
{
|
||||
efl_gfx_entity_geometry_set(item, geom);
|
||||
efl_gfx_entity_visible_set(item, EINA_TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue