diff options
Diffstat (limited to 'src/PlayerControl.cxx')
-rw-r--r-- | src/PlayerControl.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/PlayerControl.cxx b/src/PlayerControl.cxx index 56b44f1f8..cf5789f10 100644 --- a/src/PlayerControl.cxx +++ b/src/PlayerControl.cxx @@ -23,6 +23,8 @@ #include "Song.hxx" #include "DecoderControl.hxx" +#include <glib.h> + #include <cmath> #include <assert.h> @@ -31,7 +33,6 @@ player_control::player_control(unsigned _buffer_chunks, unsigned _buffered_before_play) :buffer_chunks(_buffer_chunks), buffered_before_play(_buffered_before_play), - thread(nullptr), command(PlayerCommand::NONE), state(PlayerState::STOP), error_type(PlayerError::NONE), @@ -100,11 +101,10 @@ player_control::UpdateAudio() void player_control::Kill() { - assert(thread != NULL); + assert(thread.IsDefined()); LockSynchronousCommand(PlayerCommand::EXIT); - g_thread_join(thread); - thread = NULL; + thread.Join(); idle_add(IDLE_PLAYER); } |