Elementary: Fixed some NULL pointer reference bug in elementary.
authorseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 13 Feb 2011 13:16:59 +0000 (13:16 +0000)
committerseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 13 Feb 2011 13:16:59 +0000 (13:16 +0000)
git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@56985 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_diskselector.c
src/lib/elm_gengrid.c
src/lib/elm_genlist.c
src/lib/elm_map.c

index fe34ef9..e5300af 100644 (file)
@@ -1078,7 +1078,7 @@ elm_diskselector_item_del(Elm_Diskselector_Item * it)
           }
      }
    wd->check_idler = ecore_idler_add(_check_string, wd);
-   _sizing_eval(it->base.widget);
+   _sizing_eval(wd->self);
 }
 
 /**
index bb8b692..788fca2 100644 (file)
@@ -2818,9 +2818,9 @@ elm_gengrid_last_item_get(const Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
    if (!wd->items) return NULL;
    Elm_Gengrid_Item *item = ELM_GENGRID_ITEM_FROM_INLIST(wd->items->last);
-   if (!wd) return NULL;
    while ((item) && (item->delete_me))
      item = ELM_GENGRID_ITEM_FROM_INLIST(EINA_INLIST_GET(item)->prev);
    return item;
index d078052..dbfb9c6 100644 (file)
@@ -2938,9 +2938,9 @@ elm_genlist_item_append(Evas_Object                  *obj,
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
    Elm_Genlist_Item *it = _item_new(wd, itc, data, parent, flags, func,
                                     func_data);
-   if (!wd) return NULL;
    if (!it) return NULL;
    if (!it->parent)
      {
@@ -3000,9 +3000,9 @@ elm_genlist_item_prepend(Evas_Object                  *obj,
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
    Elm_Genlist_Item *it = _item_new(wd, itc, data, parent, flags, func,
                                     func_data);
-   if (!wd) return NULL;
    if (!it) return NULL;
    if (!it->parent)
      {
@@ -3059,9 +3059,9 @@ elm_genlist_item_insert_before(Evas_Object                  *obj,
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    EINA_SAFETY_ON_NULL_RETURN_VAL(before, NULL);
    Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
    Elm_Genlist_Item *it = _item_new(wd, itc, data, parent, flags, func,
                                     func_data);
-   if (!wd) return NULL;
    if (!it) return NULL;
    if (it->parent)
      {
@@ -3107,9 +3107,9 @@ elm_genlist_item_insert_after(Evas_Object                  *obj,
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    EINA_SAFETY_ON_NULL_RETURN_VAL(after, NULL);
    Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
    Elm_Genlist_Item *it = _item_new(wd, itc, data, parent, flags, func,
                                     func_data);
-   if (!wd) return NULL;
    if (!it) return NULL;
    wd->items = eina_inlist_append_relative(wd->items, EINA_INLIST_GET(it),
                                            EINA_INLIST_GET(after));
index 3a216bc..6565a68 100644 (file)
@@ -1951,7 +1951,8 @@ _group_bubble_place(Marker_Group *group)
    edje_object_size_min_calc(group->bubble, NULL, &hh);
 
    s = edje_object_data_get(group->bubble, "size_w");
-   ww = atoi(s);
+   if (s) ww = atoi(s);
+   else ww = 0;
    xx = x + w / 2 - ww / 2;
    yy = y-hh;
 
@@ -2830,13 +2831,17 @@ elm_map_marker_add(Evas_Object *obj, double lon, double lat, Elm_Map_Marker_Clas
        o = edje_object_add(evas_object_evas_get(obj));
        _elm_theme_object_set(obj, o, "map/marker", style, elm_widget_style_get(obj));
        s = edje_object_data_get(o, "size_w");
-       clas_group->priv.edje_w = atoi(s);
+       if (s) clas_group->priv.edje_w = atoi(s);
+       else clas_group->priv.edje_w = 0;
        s = edje_object_data_get(o, "size_h");
-       clas_group->priv.edje_h = atoi(s);
+       if (s) clas_group->priv.edje_h = atoi(s);
+       else clas_group->priv.edje_h = 0;
        s = edje_object_data_get(o, "size_max_w");
-       clas_group->priv.edje_max_w = atoi(s);
+       if (s) clas_group->priv.edje_max_w = atoi(s);
+       else clas_group->priv.edje_max_w = 0;
        s = edje_object_data_get(o, "size_max_h");
-       clas_group->priv.edje_max_h = atoi(s);
+       if (s) clas_group->priv.edje_max_h = atoi(s);
+       else clas_group->priv.edje_max_h = 0;
        evas_object_del(o);
 
        clas_group->priv.set = EINA_TRUE;
@@ -2851,9 +2856,11 @@ elm_map_marker_add(Evas_Object *obj, double lon, double lat, Elm_Map_Marker_Clas
        o = edje_object_add(evas_object_evas_get(obj));
        _elm_theme_object_set(obj, o, "map/marker", style, elm_widget_style_get(obj));
        s = edje_object_data_get(o, "size_w");
-       clas->priv.edje_w = atoi(s);
+       if (s) clas->priv.edje_w = atoi(s);
+       else clas->priv.edje_w = 0;
        s = edje_object_data_get(o, "size_h");
-       clas->priv.edje_h = atoi(s);
+       if (s) clas->priv.edje_h = atoi(s);
+       else clas->priv.edje_h = 0;
        evas_object_del(o);
 
        clas->priv.set = EINA_TRUE;