1
0
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:
tux3 2015-06-02 00:02:18 +02:00
parent 8ad0f6c573
commit bc946308c8

View File

@ -184,7 +184,10 @@ void AVForm::onVideoDevChanged(int index)
}
camVideoSurface->setSource(nullptr);
if (camera)
{
delete camera;
camera = nullptr;
}
QString dev = videoDeviceList[index].first;
Settings::getInstance().setVideoDev(dev);
updateVideoModes(index);