From: cedric Date: Mon, 13 Jun 2011 07:43:11 +0000 (+0000) Subject: elementary: add safety check to prevent some ill request. X-Git-Tag: REL_F_I9500_20120323_1~17^2~2579 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a850c6156a06145ec54f67a6ec4e5f4a42ef9501;p=framework%2Fuifw%2Felementary.git elementary: add safety check to prevent some ill request. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@60261 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index cf606cb..800064f 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -3765,6 +3765,9 @@ elm_genlist_item_insert_after(Evas_Object *obj, Elm_Genlist_Item *it = _item_new(wd, itc, data, parent, flags, func, func_data); if (!it) return NULL; + /* It make no sense to insert after in an empty list with after != NULL, something really bad is happening in your app. */ + EINA_SAFETY_ON_NULL_RETURN_VAL(wd->items, NULL); + wd->items = eina_inlist_append_relative(wd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(after)); if (it->parent)