From 993acf04daaa3b03d1c7d3878f2db4f2b32d9ffa Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 27 Jan 2009 18:17:11 +0100 Subject: Fix song moving while playing quickmix Use *real* station id, not the one of the quickmix station --- src/ui_act.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ui_act.c b/src/ui_act.c index 3046445..ae42164 100644 --- a/src/ui_act.c +++ b/src/ui_act.c @@ -208,7 +208,7 @@ void BarUiActSkipSong (BAR_KS_ARGS) { /* move song to different station */ void BarUiActMoveSong (BAR_KS_ARGS) { - PianoStation_t *moveStation; + PianoStation_t *moveStation, *fromStation; RETURN_IF_NO_SONG; @@ -220,7 +220,12 @@ void BarUiActMoveSong (BAR_KS_ARGS) { } printf ("Moving song to \"%s\"... ", moveStation->name); fflush (stdout); - if (BarUiPrintPianoStatus (PianoMoveSong (ph, *curStation, + fromStation = PianoFindStationById (ph->stations, (*curSong)->stationId); + if (fromStation == NULL) { + BarUiMsg ("Station not found\n"); + return; + } + if (BarUiPrintPianoStatus (PianoMoveSong (ph, fromStation, moveStation, *curSong)) == PIANO_RET_OK) { player->doQuit = 1; } -- cgit v1.2.3