diff options
Diffstat (limited to 'src/DecoderControl.cxx')
-rw-r--r-- | src/DecoderControl.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/DecoderControl.cxx b/src/DecoderControl.cxx index 07f6f9fde..330c791dd 100644 --- a/src/DecoderControl.cxx +++ b/src/DecoderControl.cxx @@ -27,8 +27,7 @@ #include <assert.h> decoder_control::decoder_control() - :thread(nullptr), - state(DecoderState::STOP), + :state(DecoderState::STOP), command(DecoderCommand::NONE), song(nullptr), replay_gain_db(0), replay_gain_prev_db(0), @@ -124,13 +123,12 @@ decoder_control::Seek(double where) void decoder_control::Quit() { - assert(thread != nullptr); + assert(thread.IsDefined()); quit = true; LockAsynchronousCommand(DecoderCommand::STOP); - g_thread_join(thread); - thread = nullptr; + thread.Join(); } void |