summaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-02-20 21:24:01 +0100
committerMax Kellermann <max@musicpd.org>2019-02-20 21:24:01 +0100
commitcf2d171cccfbc5627ce9957cc8dd63272a16e0d3 (patch)
treed73709268ca2dee32247ef38e660fe6b59a90fac /src/db
parentcc28a7b67fcfe006b49171343eaf37f5862014da (diff)
db/simple: reorder checks in assert() to fix assertion failure
`light_song.Get()` could cause an assertion failure because the `Manual<>` object must not be used if uninitialized. Regression by commit ebc006ab529169d3d067231863ab7fc52fd9c49a
Diffstat (limited to 'src/db')
-rw-r--r--src/db/plugins/simple/SimpleDatabasePlugin.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db/plugins/simple/SimpleDatabasePlugin.cxx b/src/db/plugins/simple/SimpleDatabasePlugin.cxx
index 112cb9fdd..877126726 100644
--- a/src/db/plugins/simple/SimpleDatabasePlugin.cxx
+++ b/src/db/plugins/simple/SimpleDatabasePlugin.cxx
@@ -251,7 +251,7 @@ void
SimpleDatabase::ReturnSong(gcc_unused const LightSong *song) const noexcept
{
assert(song != nullptr);
- assert(song == &light_song.Get() || song == prefixed_light_song);
+ assert(song == prefixed_light_song || song == &light_song.Get());
if (prefixed_light_song != nullptr) {
delete prefixed_light_song;