elm-containers: use alive api
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Wed, 1 Aug 2018 14:41:45 +0000 (16:41 +0200)
committerYoungbok Shin <youngb.shin@samsung.com>
Tue, 18 Sep 2018 08:40:00 +0000 (17:40 +0900)
check if the object is in its correct lifetime before performing
operations

Differential Revision: https://phab.enlightenment.org/D6724

src/lib/elementary/efl_ui_box.c
src/lib/elementary/efl_ui_layout_object.c
src/lib/elementary/efl_ui_table.c
src/lib/elementary/elm_box.c
src/lib/elementary/elm_table.c

index 7cec46a..864e729 100644 (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;
 
index 5257a33..bc94cac 100644 (file)
@@ -167,6 +167,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)
index 176c57d..fa1a6e4 100644 (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);
index 3c91b17..178eef2 100644 (file)
@@ -146,6 +146,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);
index 6832d45..258393b 100644 (file)
@@ -143,6 +143,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);