elm-containers: use alive api

check if the object is in its correct lifetime before performing
operations

Differential Revision: https://phab.enlightenment.org/D6724
This commit is contained in:
Marcel Hollerbach 2018-08-01 16:41:45 +02:00 committed by Stefan Schmidt
parent 068e09cf2e
commit f570e7435e
5 changed files with 6 additions and 0 deletions

View File

@ -41,6 +41,7 @@ _sizing_eval(Evas_Object *obj, Efl_Ui_Box_Data *sd)
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
if (!efl_alive_get(obj)) return;
if (sd->delete_me)
return;

View File

@ -155,6 +155,8 @@ _sizing_eval(Evas_Object *obj, Efl_Ui_Layout_Object_Data *sd)
Evas_Coord rest_w = 0, rest_h = 0;
ELM_WIDGET_DATA_GET_OR_RETURN(sd->obj, wd);
if (!efl_alive_get(obj)) return;
if (sd->restricted_calc_w)
rest_w = wd->w;
if (sd->restricted_calc_h)

View File

@ -53,6 +53,7 @@ _sizing_eval(Evas_Object *obj, Efl_Ui_Table_Data *pd EINA_UNUSED)
Evas_Coord w, h;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
if (!efl_alive_get(obj)) return;
evas_object_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
evas_object_size_hint_max_get(wd->resize_obj, &maxw, &maxh);

View File

@ -79,6 +79,7 @@ _sizing_eval(Evas_Object *obj)
ELM_BOX_DATA_GET(obj, sd);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
if (!efl_alive_get(obj)) return;
if (sd->delete_me) return;
evas_object_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);

View File

@ -59,6 +59,7 @@ _sizing_eval(Evas_Object *obj)
Evas_Coord minw = 0, minh = 0;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
if (!efl_alive_get(obj)) return;
evas_object_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
evas_object_size_hint_min_set(obj, minw, minh);