Commit 6ee7d88a authored by Max Kellermann's avatar Max Kellermann

db/update/Archive: fix inverted nullptr check

Regression by commit bbdf2dcf
parent bbdf2dcf
...@@ -83,7 +83,7 @@ UpdateWalk::UpdateArchiveTree(ArchiveFile &archive, Directory &directory, ...@@ -83,7 +83,7 @@ UpdateWalk::UpdateArchiveTree(ArchiveFile &archive, Directory &directory,
Song *song = LockFindSong(directory, name); Song *song = LockFindSong(directory, name);
if (song == nullptr) { if (song == nullptr) {
auto new_song = Song::LoadFromArchive(archive, name, directory); auto new_song = Song::LoadFromArchive(archive, name, directory);
if (!new_song) { if (new_song) {
{ {
const ScopeDatabaseLock protect; const ScopeDatabaseLock protect;
directory.AddSong(std::move(new_song)); directory.AddSong(std::move(new_song));
......
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