mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fix double free when switching camera
This commit is contained in:
parent
8ad0f6c573
commit
bc946308c8
|
@ -184,7 +184,10 @@ void AVForm::onVideoDevChanged(int index)
|
||||||
}
|
}
|
||||||
camVideoSurface->setSource(nullptr);
|
camVideoSurface->setSource(nullptr);
|
||||||
if (camera)
|
if (camera)
|
||||||
|
{
|
||||||
delete camera;
|
delete camera;
|
||||||
|
camera = nullptr;
|
||||||
|
}
|
||||||
QString dev = videoDeviceList[index].first;
|
QString dev = videoDeviceList[index].first;
|
||||||
Settings::getInstance().setVideoDev(dev);
|
Settings::getInstance().setVideoDev(dev);
|
||||||
updateVideoModes(index);
|
updateVideoModes(index);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user