diff options
author | Max Kellermann <max@duempel.org> | 2014-01-20 23:48:46 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-21 00:28:37 +0100 |
commit | 4f120f371474dbdc3e7ec4182d257dc9492d827b (patch) | |
tree | 48e5de91898765b801b980ed30135f0bf678c24c /src/PlaylistQueue.cxx | |
parent | dd20a3ce7e5d6bb3efd41a2c9ab5ba27e8e15248 (diff) | |
download | mpd-4f120f371474dbdc3e7ec4182d257dc9492d827b.tar.gz mpd-4f120f371474dbdc3e7ec4182d257dc9492d827b.tar.xz mpd-4f120f371474dbdc3e7ec4182d257dc9492d827b.zip |
PlaylistSong: modify the given song object in-place
Reduce bloat.
Diffstat (limited to 'src/PlaylistQueue.cxx')
-rw-r--r-- | src/PlaylistQueue.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/PlaylistQueue.cxx b/src/PlaylistQueue.cxx index e65608bf4..0a45920e3 100644 --- a/src/PlaylistQueue.cxx +++ b/src/PlaylistQueue.cxx @@ -48,10 +48,11 @@ playlist_load_into_queue(const char *uri, SongEnumerator &e, continue; } - song = playlist_check_translate_song(song, base_uri.c_str(), - secure); - if (song == nullptr) + if (!playlist_check_translate_song(*song, base_uri.c_str(), + secure)) { + delete song; continue; + } PlaylistResult result = dest.AppendSong(pc, std::move(*song)); delete song; |