Commit 1ed321f9 authored by Max Kellermann's avatar Max Kellermann

db/proxy: add missing nullptr check

parent 2aee1b86
......@@ -194,7 +194,8 @@ ProxyDatabase::GetSong(const char *uri, Error &error) const
Song *song2 = song != nullptr
? Convert(song)
: nullptr;
mpd_song_free(song);
if (song != nullptr)
mpd_song_free(song);
if (!mpd_response_finish(connection)) {
if (song2 != nullptr)
song2->Free();
......
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