diff --git a/plugins/VOIP/gui/AudioInputConfig.cpp b/plugins/VOIP/gui/AudioInputConfig.cpp index d978c59dd..ba97bafb3 100644 --- a/plugins/VOIP/gui/AudioInputConfig.cpp +++ b/plugins/VOIP/gui/AudioInputConfig.cpp @@ -276,8 +276,7 @@ void AudioInputConfig::emptyBuffer() { } void AudioInputConfig::on_qpbAudioWizard_clicked() { - AudioWizard *aw = new AudioWizard(this); - aw->exec(); - delete aw; + AudioWizard aw(this); + aw.exec(); loadSettings(); } diff --git a/plugins/VOIP/gui/AudioWizard.cpp b/plugins/VOIP/gui/AudioWizard.cpp index 38d12c89b..1b75d40da 100644 --- a/plugins/VOIP/gui/AudioWizard.cpp +++ b/plugins/VOIP/gui/AudioWizard.cpp @@ -41,11 +41,28 @@ AudioWizard::~AudioWizard() { + if (ticker) { + ticker->stop(); + } if (inputDevice) { inputDevice->stop(); + delete(inputDevice); + inputDevice = NULL; + } + if (inputProcessor) { + inputProcessor->close(); + delete(inputProcessor); + inputProcessor = NULL; } if (outputDevice) { outputDevice->stop(); + delete(outputDevice); + outputDevice = NULL; + } + if (outputProcessor) { + outputProcessor->close(); + delete(outputProcessor); + outputProcessor = NULL; } } diff --git a/plugins/VOIP/gui/SpeexProcessor.cpp b/plugins/VOIP/gui/SpeexProcessor.cpp index cc764f9f8..d159cc55d 100644 --- a/plugins/VOIP/gui/SpeexProcessor.cpp +++ b/plugins/VOIP/gui/SpeexProcessor.cpp @@ -95,7 +95,9 @@ SpeexInputProcessor::SpeexInputProcessor(QObject *parent) : QIODevice(parent), } SpeexInputProcessor::~SpeexInputProcessor() { + if (preprocessor) { speex_preprocess_state_destroy(preprocessor); + } if (echo_state) { speex_echo_state_destroy(echo_state); } diff --git a/retroshare-gui/src/gui/settings/AppearancePage.cpp b/retroshare-gui/src/gui/settings/AppearancePage.cpp index 549ef19f5..3f1bb0295 100755 --- a/retroshare-gui/src/gui/settings/AppearancePage.cpp +++ b/retroshare-gui/src/gui/settings/AppearancePage.cpp @@ -62,8 +62,10 @@ AppearancePage::AppearancePage(QWidget * parent, Qt::WFlags flags) AppearancePage::~AppearancePage() { - /* reaload style sheet */ - Rshare::loadStyleSheet(Settings->getSheetName()); + if (wasLoaded()) { + /* reaload style sheet */ + Rshare::loadStyleSheet(Settings->getSheetName()); + } } /** Saves the changes on this page */