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 ebc006ab52
This commit is contained in:
parent
cc28a7b67f
commit
cf2d171ccc
2
NEWS
2
NEWS
|
@ -2,6 +2,8 @@ ver 0.21.5 (not yet released)
|
|||
* protocol
|
||||
- fix deadlock in "albumart" command
|
||||
- fix "tagtypes disable" command
|
||||
* database
|
||||
- simple: fix assertion failure
|
||||
* input
|
||||
- buffer: fix crash bug when playing remote WAV file
|
||||
* tags
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue