From 1ed321f9647b88c1489d7f81095fbf6156d24454 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 30 Oct 2013 09:37:20 +0100 Subject: db/proxy: add missing nullptr check --- src/db/ProxyDatabasePlugin.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/db/ProxyDatabasePlugin.cxx') diff --git a/src/db/ProxyDatabasePlugin.cxx b/src/db/ProxyDatabasePlugin.cxx index c0c9f93e7..b8b660b44 100644 --- a/src/db/ProxyDatabasePlugin.cxx +++ b/src/db/ProxyDatabasePlugin.cxx @@ -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(); -- cgit v1.2.3