summaryrefslogtreecommitdiff
path: root/src/ui_act.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui_act.c')
-rw-r--r--src/ui_act.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ui_act.c b/src/ui_act.c
index a57cb01..096daa1 100644
--- a/src/ui_act.c
+++ b/src/ui_act.c
@@ -190,7 +190,8 @@ BarUiActCallback(BarUiActDeleteStation) {
if (BarUiActDefaultPianoCall (PIANO_REQUEST_DELETE_STATION,
selStation) && selStation == app->curStation) {
BarUiDoSkipSong (&app->player);
- PianoDestroyPlaylist (app->playlist);
+ PianoDestroyPlaylist (app->playlist->next);
+ BarUiHistoryPrepend (app, app->playlist);
app->playlist = NULL;
app->curStation = NULL;
}
@@ -381,8 +382,11 @@ BarUiActCallback(BarUiActSelectStation) {
app->curStation = newStation;
BarUiPrintStation (app->curStation);
BarUiDoSkipSong (&app->player);
- PianoDestroyPlaylist (app->playlist);
- app->playlist = NULL;
+ if (app->playlist != NULL) {
+ PianoDestroyPlaylist (app->playlist->next);
+ BarUiHistoryPrepend (app, app->playlist);
+ app->playlist = NULL;
+ }
}
}