summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-06-17 12:06:36 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-06-17 12:06:36 -0400
commitf35a5f247e6b5446638b14465a20862ee928e702 (patch)
tree22d2c71fb7ed2dd0daabd6c622c3a44c91183cc6
parent37ecf51b4516bfdded2887e90e7d389696ea0d86 (diff)
add safety abort() for items added without a header since this is a bug
-rw-r--r--src/bin/empc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bin/empc.c b/src/bin/empc.c
index c96fb10..d1a4d69 100644
--- a/src/bin/empc.c
+++ b/src/bin/empc.c
@@ -2830,6 +2830,7 @@ queue_list_handler(Eina_Value *value, Eina_Bool update)
2830 if (!insert) break; 2830 if (!insert) break;
2831 exist = elm_object_item_data_get(insert); 2831 exist = elm_object_item_data_get(insert);
2832 if (exist->song_pos < target) break; 2832 if (exist->song_pos < target) break;
2833 //fprintf(stderr, "DEL %s\n", exist->title);
2833 elm_object_item_del(insert); 2834 elm_object_item_del(insert);
2834 } while (insert); 2835 } while (insert);
2835 prev = elm_genlist_item_prev_get(next); 2836 prev = elm_genlist_item_prev_get(next);
@@ -2858,6 +2859,8 @@ queue_list_handler(Eina_Value *value, Eina_Bool update)
2858 2859
2859 /* skip header item... */ 2860 /* skip header item... */
2860 it = elm_genlist_item_prev_get(elm_genlist_last_item_get(queue_list)); 2861 it = elm_genlist_item_prev_get(elm_genlist_last_item_get(queue_list));
2862 //Empd_Empdd_Song *ss = elm_object_item_data_get(it);
2863 //fprintf(stderr, "2863 DEL %s\n", ss->title);
2861 elm_object_item_del(it); 2864 elm_object_item_del(it);
2862 } 2865 }
2863 } 2866 }
@@ -2948,6 +2951,11 @@ queue_list_handler(Eina_Value *value, Eina_Bool update)
2948 itp = NULL; 2951 itp = NULL;
2949 } 2952 }
2950 } 2953 }
2954 if (!ith)
2955 {
2956 CRI("NO HEADER ITEM FOUND!!! BUG!!");
2957 abort();
2958 }
2951 if (end || (!itp)) 2959 if (end || (!itp))
2952 it = elm_genlist_item_append(queue_list, &queue_itc, so, ith, ELM_GENLIST_ITEM_NONE, queue_list_item_select, NULL); 2960 it = elm_genlist_item_append(queue_list, &queue_itc, so, ith, ELM_GENLIST_ITEM_NONE, queue_list_item_select, NULL);
2953 else if (itp) 2961 else if (itp)