Elementary: check object class
authorDaniel Zaoui <daniel.zaoui@samsung.com>
Thu, 14 Mar 2013 09:35:34 +0000 (11:35 +0200)
committerDaniel Zaoui <daniel.zaoui@samsung.com>
Tue, 9 Apr 2013 18:29:24 +0000 (21:29 +0300)
We need to check that the object is an edje object before calling the
edje function.

src/lib/elm_colorselector.c

index 9321ca3..bc5da90 100644 (file)
@@ -1141,7 +1141,8 @@ _sub_obj_size_hints_set(Evas_Object *sobj,
    Evas_Coord minw = -1, minh = -1;
 
    elm_coords_finger_size_adjust(timesw, &minw, timesh, &minh);
-   edje_object_size_min_restricted_calc(sobj, &minw, &minh, minw, minh);
+   if (sobj && eo_isa(sobj, EDJE_OBJ_CLASS))
+      edje_object_size_min_restricted_calc(sobj, &minw, &minh, minw, minh);
    evas_object_size_hint_min_set(sobj, minw, minh);
    evas_object_size_hint_max_set(sobj, -1, -1);
 }
@@ -1154,7 +1155,8 @@ _item_sizing_eval(Elm_Color_Item *item)
    if (!item) return;
 
    elm_coords_finger_size_adjust(1, &minw, 1, &minh);
-   edje_object_size_min_restricted_calc(VIEW(item), &minw, &minh, minw, minh);
+   if (VIEW(item) && eo_isa(VIEW(item), EDJE_OBJ_CLASS))
+      edje_object_size_min_restricted_calc(VIEW(item), &minw, &minh, minw, minh);
    evas_object_size_hint_min_set(VIEW(item), minw, minh);
 }