aboutsummaryrefslogtreecommitdiffstats
path: root/src/player/Control.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/player/Control.cxx')
-rw-r--r--src/player/Control.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/player/Control.cxx b/src/player/Control.cxx
index d7352ad57..75742d2cf 100644
--- a/src/player/Control.cxx
+++ b/src/player/Control.cxx
@@ -227,7 +227,11 @@ PlayerControl::Seek(DetachedSong *song, SongTime t)
Lock();
- delete next_song;
+ if (next_song != nullptr)
+ SynchronousCommand(PlayerCommand::CANCEL);
+
+ assert(next_song == nullptr);
+
next_song = song;
seek_time = t;
SynchronousCommand(PlayerCommand::SEEK);