mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 22:22:45 -04:00
Added missing initialization and check of members in VOIPConfigPanel to fix crash at shutdown with enabled plugin VOIP
This commit is contained in:
parent
b700c451d4
commit
0ffb31be85
1 changed files with 16 additions and 6 deletions
|
@ -92,6 +92,9 @@ VOIPConfigPanel::VOIPConfigPanel(QWidget * parent, Qt::WindowFlags flags)
|
||||||
|
|
||||||
inputAudioProcessor = NULL;
|
inputAudioProcessor = NULL;
|
||||||
inputAudioDevice = NULL;
|
inputAudioDevice = NULL;
|
||||||
|
graph_source = nullptr;
|
||||||
|
videoInput = nullptr;
|
||||||
|
videoProcessor = nullptr;
|
||||||
qtTick = NULL;
|
qtTick = NULL;
|
||||||
|
|
||||||
ui.qcbTransmit->addItem(tr("Continuous"), RsVOIP::AudioTransmitContinous);
|
ui.qcbTransmit->addItem(tr("Continuous"), RsVOIP::AudioTransmitContinous);
|
||||||
|
@ -209,11 +212,16 @@ VOIPConfigPanel::~VOIPConfigPanel()
|
||||||
|
|
||||||
void VOIPConfigPanel::clearPipeline()
|
void VOIPConfigPanel::clearPipeline()
|
||||||
{
|
{
|
||||||
|
if (qtTick) {
|
||||||
delete qtTick;
|
delete qtTick;
|
||||||
|
qtTick = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (graph_source) {
|
||||||
graph_source->stop() ;
|
graph_source->stop() ;
|
||||||
graph_source->setVideoInput(NULL) ;
|
graph_source->setVideoInput(NULL) ;
|
||||||
graph_source=nullptr; // is deleted by setSource below. This is a bad design.
|
graph_source=nullptr; // is deleted by setSource below. This is a bad design.
|
||||||
|
}
|
||||||
|
|
||||||
ui.voipBwGraph->setSource(nullptr);
|
ui.voipBwGraph->setSource(nullptr);
|
||||||
|
|
||||||
|
@ -225,8 +233,10 @@ void VOIPConfigPanel::clearPipeline()
|
||||||
|
|
||||||
videoInput = nullptr;
|
videoInput = nullptr;
|
||||||
}
|
}
|
||||||
|
if (videoProcessor) {
|
||||||
delete videoProcessor;
|
delete videoProcessor;
|
||||||
videoProcessor = nullptr;
|
videoProcessor = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
if (inputAudioDevice) {
|
if (inputAudioDevice) {
|
||||||
inputAudioDevice->stop();
|
inputAudioDevice->stop();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue