Elementary: Fixed some NULL pointer reference bug in elementary.
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Sun, 13 Feb 2011 13:16:59 +0000 (13:16 +0000)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Sun, 13 Feb 2011 13:16:59 +0000 (13:16 +0000)
SVN revision: 56985

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

index fe34ef93fe36541a1c3a85a045bd08582f9c0e20..e5300afc8c89b0617e7dc56550bdbe84ab96c98e 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 bb8b692c6eaaa2c05237d9bbe21d4754e6ba1d7f..788fca2d95fb2c02371d59f14336b880fb67ef52 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 d0780527eb14f2fe050fa294e95e1a814ca2a90b..dbfb9c642a9002d6ab6f7450ece731bd6582654d 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 3a216bc35739603fe3205ad09c24415c08f79284..6565a688e0037260ed460b48b453ea989c0bd447 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;