summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2015-10-04 15:09:40 +0100
committerNicolas Aguirre <aguirre.nicolas@gmail.com>2015-11-12 10:15:03 +0100
commit51ddb487d32496ec36b4e85c3c84fb794db5bb5f (patch)
treebee068a0c1dcaeb182e289fe34479b11c2a91f82
parentf33a25e42b0c4984f5fad072cde2a6ce386c4e7a (diff)
Genlist: only get item data if needed.
Moved the data fetching to be after the tests. This doesn't really matter and is mostly there to silence coverity. Coverity was complaining about "it" being dereferenced before the null check (implicit in EO_OBJ), so reordering it will fix it. CID 1040000
-rw-r--r--src/lib/elm_genlist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index cb71fb95d..a5a34fff2 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -3941,11 +3941,12 @@ _swipe_do(Elm_Gen_Item *it)
3941{ 3941{
3942 int i, sum = 0; 3942 int i, sum = 0;
3943 Eina_Bool tmp; 3943 Eina_Bool tmp;
3944 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
3945 3944
3946 if (_is_no_select(it) || 3945 if (_is_no_select(it) ||
3947 eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get())) return; 3946 eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get())) return;
3948 3947
3948 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
3949
3949 sd->swipe = EINA_FALSE; 3950 sd->swipe = EINA_FALSE;
3950 for (i = 0; i < sd->movements; i++) 3951 for (i = 0; i < sd->movements; i++)
3951 { 3952 {