Fix crash when clicked 'Sorted insert' of elementary_test "gengrid 2"

This commit is contained in:
Ryuan Choi 2013-05-16 15:01:51 +09:00 committed by ChunEon Park
parent d53cc519ff
commit 97f0333f1d
2 changed files with 4 additions and 3 deletions

View File

@ -604,8 +604,8 @@ _before_bt_clicked(void *data, Evas_Object *obj __UNUSED__, void *event_info __U
static int
compare_cb(const void *data1, const void *data2)
{
Testitem *ti1 = (Testitem *)data1;
Testitem *ti2 = (Testitem *)data2;
Testitem *ti1 = (Testitem *)elm_object_item_data_get(data1);
Testitem *ti2 = (Testitem *)elm_object_item_data_get(data2);
return strlen(ti1->path) - strlen(ti2->path);
}

View File

@ -244,7 +244,7 @@ EAPI Elm_Object_Item *elm_gengrid_item_insert_after(Evas_Object *obj
* @param gic The item class for the item.
* @param data The item data.
* @param comp User defined comparison function that defines the sort order
* based on Elm_Gen_Item and its data param.
* based on gengrid item and its data.
* @param func Convenience function called when the item is selected.
* @param func_data Data to be passed to @p func.
* @return A handle to the item added or @c NULL, on errors.
@ -256,6 +256,7 @@ EAPI Elm_Object_Item *elm_gengrid_item_insert_after(Evas_Object *obj
* @see elm_gengrid_item_append()
* @see elm_gengrid_item_prepend()
* @see elm_gengrid_item_insert_after()
* @see elm_object_item_data_get()
* @see elm_object_item_del()
*
* @ingroup Gengrid