diff options
author | Mike Blumenkrantz <zmike@osg.samsung.com> | 2016-05-28 13:11:32 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2016-05-28 13:12:22 -0400 |
commit | 251376703b6df7c33b30bc22707d55fcf05b61ec (patch) | |
tree | ff8f5c803cc54f7cae360c21184a8dbc1e8ea7ba /src | |
parent | 5604b52a2d74263a308d09254b07ba705f24dc64 (diff) |
ensure parent item exists before using parent data during queue item delete
this is not true during window deletion
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/empc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/empc.c b/src/bin/empc.c index bb9996c..6547b4c 100644 --- a/src/bin/empc.c +++ b/src/bin/empc.c | |||
@@ -2605,19 +2605,20 @@ static void | |||
2605 | queue_list_item_del(Empd_Empdd_Song *so, Evas_Object *obj EINA_UNUSED) | 2605 | queue_list_item_del(Empd_Empdd_Song *so, Evas_Object *obj EINA_UNUSED) |
2606 | { | 2606 | { |
2607 | Elm_Object_Item *it, *itg; | 2607 | Elm_Object_Item *it, *itg; |
2608 | Empd_Empdd_Song *sog; | 2608 | Empd_Empdd_Song *sog = NULL; |
2609 | 2609 | ||
2610 | if (empd_song_item && (elm_object_item_data_get(empd_song_item) == so)) | 2610 | if (empd_song_item && (elm_object_item_data_get(empd_song_item) == so)) |
2611 | empd_song_item = NULL; | 2611 | empd_song_item = NULL; |
2612 | it = eina_hash_set(empd_current_queue, &so->songid, NULL); | 2612 | it = eina_hash_set(empd_current_queue, &so->songid, NULL); |
2613 | itg = elm_genlist_item_parent_get(it); | 2613 | itg = elm_genlist_item_parent_get(it); |
2614 | sog = elm_object_item_data_get(itg); | 2614 | if (itg) |
2615 | sog = elm_object_item_data_get(itg); | ||
2615 | if (empd_songid == so->songid) | 2616 | if (empd_songid == so->songid) |
2616 | { | 2617 | { |
2617 | elm_object_item_signal_emit(itg, "empc,state,not_playing", "empc"); | 2618 | elm_object_item_signal_emit(itg, "empc,state,not_playing", "empc"); |
2618 | elm_genlist_item_fields_update(itg, EMPC_TEXT_TIME, ELM_GENLIST_ITEM_FIELD_TEXT); | 2619 | elm_genlist_item_fields_update(itg, EMPC_TEXT_TIME, ELM_GENLIST_ITEM_FIELD_TEXT); |
2619 | } | 2620 | } |
2620 | if (sog->songid == so->songid) | 2621 | if (sog && (sog->songid == so->songid)) |
2621 | { | 2622 | { |
2622 | it = elm_genlist_item_next_get(it); | 2623 | it = elm_genlist_item_next_get(it); |
2623 | if (it && (elm_genlist_item_parent_get(it) == itg)) | 2624 | if (it && (elm_genlist_item_parent_get(it) == itg)) |