Commit 19a982cf authored by Max Kellermann's avatar Max Kellermann

Mapper: convert IsInDatabase() check to assertion in map_song_detach()

parent 746a4798
......@@ -238,8 +238,9 @@ DetachedSong
map_song_detach(const LightSong &song)
{
DetachedSong detached(song);
assert(detached.IsInDatabase());
if (detached.IsInDatabase() && !detached.HasRealURI()) {
if (!detached.HasRealURI()) {
const auto uri = song.GetURI();
detached.SetRealURI(PathTraitsUTF8::Build(music_dir_utf8.c_str(),
uri.c_str()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment