Browse Source

Fix double free when switching camera

pull/1768/head
tux3 10 years ago
parent
commit
bc946308c8
  1. 3
      src/widget/form/settings/avform.cpp

3
src/widget/form/settings/avform.cpp

@ -184,7 +184,10 @@ void AVForm::onVideoDevChanged(int index) @@ -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);

Loading…
Cancel
Save