diff options
Diffstat (limited to 'src/DecoderThread.cxx')
-rw-r--r-- | src/DecoderThread.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/DecoderThread.cxx b/src/DecoderThread.cxx index b3f0e6f36..3364f23b3 100644 --- a/src/DecoderThread.cxx +++ b/src/DecoderThread.cxx @@ -38,8 +38,6 @@ #include "tag/ApeReplayGain.hxx" #include "Log.hxx" -#include <glib.h> - static constexpr Domain decoder_thread_domain("decoder_thread"); /** @@ -367,13 +365,12 @@ decoder_run_song(decoder_control &dc, dc.state = DecoderState::ERROR; const char *error_uri = song->uri; - char *allocated = uri_remove_auth(error_uri); - if (allocated != nullptr) - error_uri = allocated; + const std::string allocated = uri_remove_auth(error_uri); + if (!allocated.empty()) + error_uri = allocated.c_str(); dc.error.Format(decoder_domain, "Failed to decode %s", error_uri); - g_free(allocated); } dc.client_cond.signal(); |