aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/rtp_audio_stream.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/qt/rtp_audio_stream.cpp b/ui/qt/rtp_audio_stream.cpp
index 7154d8df7a..1d8971c1d1 100644
--- a/ui/qt/rtp_audio_stream.cpp
+++ b/ui/qt/rtp_audio_stream.cpp
@@ -576,6 +576,9 @@ void RtpAudioStream::outputStateChanged(QAudio::State new_state)
switch (new_state) {
case QAudio::StoppedState:
// RTP_STREAM_DEBUG("stopped %f", audio_output_->processedUSecs() / 100000.0);
+ // Detach from parent (RtpAudioStream) to prevent deleteLater from being
+ // run during destruction of this class.
+ audio_output_->setParent(0);
audio_output_->disconnect();
audio_output_->deleteLater();
audio_output_ = NULL;