summaryrefslogtreecommitdiff
path: root/src/bin/sinks_view.c
diff options
context:
space:
mode:
authorFlavio Ceolin <flavio.ceolin@gmail.com>2014-09-08 13:17:18 -0300
committerFlavio Ceolin <flavio.ceolin@gmail.com>2014-09-08 13:17:18 -0300
commit0a32e7c29d1b5371b2d546262e85eaa8c78c79eb (patch)
tree8dab7aa0bc82f7578b82fbf19bfe154cd906b0a5 /src/bin/sinks_view.c
parent2a722f6f23e57f9ef53ccfc5bca3e1b3fa613c58 (diff)
emixer: Better iteration over list items
Diffstat (limited to '')
-rw-r--r--src/bin/sinks_view.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/bin/sinks_view.c b/src/bin/sinks_view.c
index f5f7f67..87cf5be 100644
--- a/src/bin/sinks_view.c
+++ b/src/bin/sinks_view.c
@@ -43,13 +43,15 @@ _sink_removed_cb(void *data, int type EINA_UNUSED, void *info)
43 struct Sinks_View *sv = data; 43 struct Sinks_View *sv = data;
44 Emix_Sink *ev = info; 44 Emix_Sink *ev = info;
45 Elm_Object_Item *item = elm_genlist_first_item_get(sv->genlist); 45 Elm_Object_Item *item = elm_genlist_first_item_get(sv->genlist);
46 if (ev == elm_object_item_data_get(item))
47 elm_object_item_del(item);
48 46
49 while ((item = elm_genlist_item_next_get(item))) 47 if (item)
50 { 48 {
51 if (ev == elm_object_item_data_get(item)) 49 do
52 elm_object_item_del(item); 50 {
51 if (ev == elm_object_item_data_get(item))
52 elm_object_item_del(item);
53 }
54 while ((item = elm_genlist_item_next_get(item)));
53 } 55 }
54 56
55 return ECORE_CALLBACK_PASS_ON; 57 return ECORE_CALLBACK_PASS_ON;