db/proxy: add missing nullptr check

This commit is contained in:
Max Kellermann 2013-10-30 09:37:20 +01:00
parent 2aee1b86f3
commit 1ed321f964

View File

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