summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-04-17 12:47:34 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-04-17 12:48:33 +0100
commit838a67d311fcbdfbc8f68f7be29c6864751a606a (patch)
tree099fd5f0f03f7262fcd170c5f3036d860b7ab49a
parent226c1952038a1863de897becfe93095fd96786b4 (diff)
elm - genlist test - handl g_data being null
fix CID 1396944 1396946
-rw-r--r--src/bin/elementary/test_genlist.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/bin/elementary/test_genlist.c b/src/bin/elementary/test_genlist.c
index 749d04fe63..bf6ba4c9d9 100644
--- a/src/bin/elementary/test_genlist.c
+++ b/src/bin/elementary/test_genlist.c
@@ -5528,20 +5528,21 @@ test_genlist_show_item(void *data,
5528 api->itc1->func.state_get = NULL; 5528 api->itc1->func.state_get = NULL;
5529 api->itc1->func.del = NULL; 5529 api->itc1->func.del = NULL;
5530 5530
5531 g_data->gl = gl;
5532 g_data->itc1 = api->itc1;
5533
5534 max = g_data->max_items;
5535 for (i = 0; i <= max; i++)
5536 elm_genlist_item_append(gl, api->itc1, (void*)(uintptr_t)i, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
5537
5538 if (g_data) 5531 if (g_data)
5539 gli = elm_genlist_nth_item_get(gl, g_data->show_item); 5532 {
5540 if (!gli) gli = elm_genlist_last_item_get(gl); 5533 g_data->gl = gl;
5541 elm_genlist_item_show(gli, g_data->type); 5534 g_data->itc1 = api->itc1;
5542 5535
5543 //prepends item while queue processing is happening 5536 max = g_data->max_items;
5544 ecore_timer_add(0.1, _late_item_prepender, g_data); 5537 for (i = 0; i <= max; i++)
5538 elm_genlist_item_append(gl, api->itc1, (void*)(uintptr_t)i, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
5539
5540 gli = elm_genlist_nth_item_get(gl, g_data->show_item);
5541 if (!gli) gli = elm_genlist_last_item_get(gl);
5542 elm_genlist_item_show(gli, g_data->type);
5543 //prepends item while queue processing is happening
5544 ecore_timer_add(0.1, _late_item_prepender, g_data);
5545 }
5545 5546
5546 evas_object_resize(win, 480, 400); 5547 evas_object_resize(win, 480, 400);
5547 explode_win_enable(win); 5548 explode_win_enable(win);