diff options
Diffstat (limited to '')
-rw-r--r-- | src/Queue.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Queue.cxx b/src/Queue.cxx index 4226592c0..73628d02e 100644 --- a/src/Queue.cxx +++ b/src/Queue.cxx @@ -232,9 +232,11 @@ queue::DeletePosition(unsigned position) { assert(position < length); - Song *song = Get(position); - assert(!song->IsInDatabase() || song->IsDetached()); - song->Free(); + { + Song &song = Get(position); + assert(!song.IsInDatabase() || song.IsDetached()); + song.Free(); + } const unsigned id = PositionToId(position); const unsigned _order = PositionToOrder(position); |