mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-16 10:33:52 +02:00
Fix a (possible) crash in QObject::disconnect
This is https://worklist.net/19827
This commit is contained in:
parent
f13bbdfae6
commit
37f0635024
1 changed files with 3 additions and 1 deletions
|
@ -1327,8 +1327,10 @@ bool Audio::switchInputToAudioDevice(const QAudioDeviceInfo& inputDeviceInfo) {
|
|||
|
||||
// cleanup any previously initialized device
|
||||
if (_audioInput) {
|
||||
// The call to stop() causes _inputDevice to be destructed.
|
||||
// That in turn causes it to be disconnected (see for example
|
||||
// http://stackoverflow.com/questions/9264750/qt-signals-and-slots-object-disconnect).
|
||||
_audioInput->stop();
|
||||
disconnect(_inputDevice);
|
||||
_inputDevice = NULL;
|
||||
|
||||
delete _audioInput;
|
||||
|
|
Loading…
Reference in a new issue