Fixed crash and memory leak in the AudioWizard of the VOIP plugin.

Please use at least Qt 4.6.4 when compiling RetrosShare with the VOIP plugin because of the fix of the bug QTBUG-11883.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5603 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-09-25 23:08:46 +00:00
parent 54f0c208df
commit e6db506cb2
4 changed files with 25 additions and 5 deletions

View File

@ -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();
}

View File

@ -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;
}
}

View File

@ -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);
}

View File

@ -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 */