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

This commit is contained in:
Max Kellermann 2014-02-07 00:29:59 +01:00
parent 746a47982b
commit 19a982cf69
1 changed files with 2 additions and 1 deletions

View File

@ -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()));