From edc415be476c7ef59f00914b2a6dfc6896d7a34d Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Tue, 25 Aug 2015 14:09:16 +0200 Subject: Fix crash in QSoundEffect when using it from a non-GUI thread. The internal QIODevice used as data source was not set as child of the parent QSoundEffectPrivate. If moveToThread() was called on the QSoundEffect, the QIODevice would still receive events on the main thread, leading to race conditions. Task-number: QTBUG-46359 Change-Id: I180da2fb498108b316fd9b5b5cc84376b360fa3f Reviewed-by: Christian Stromme --- src/multimedia/audio/qsoundeffect_qaudio_p.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/multimedia/audio') diff --git a/src/multimedia/audio/qsoundeffect_qaudio_p.cpp b/src/multimedia/audio/qsoundeffect_qaudio_p.cpp index c4776b32d..e95e4e521 100644 --- a/src/multimedia/audio/qsoundeffect_qaudio_p.cpp +++ b/src/multimedia/audio/qsoundeffect_qaudio_p.cpp @@ -297,6 +297,7 @@ void QSoundEffectPrivate::setCategory(const QString &category) } PrivateSoundSource::PrivateSoundSource(QSoundEffectPrivate* s): + QIODevice(s), m_loopCount(1), m_runningCount(0), m_playing(false), -- cgit v1.2.3