Commit bbda5dd3 authored by Yash Shah's avatar Yash Shah
Browse files

Fixing webcam configuration crash when index becomes less than zero

BUG: 311144
parent 50dc0deb
......@@ -78,6 +78,8 @@ void SimonWebcamConfiguration::updateImage(const QImage &image)
int SimonWebcamConfiguration::startWebcam(int webcamIndex)
{
if(webcamIndex<0)
return 0;
if(webcamIndex==WebcamConfiguration::webcamIndex())
{
emit changed(false);
......@@ -99,15 +101,6 @@ int SimonWebcamConfiguration::startWebcam(int webcamIndex)
else
{
return 0;
// if(webcamIndex!=1)
// this->webcamIndex--;
// else
// {
// if(capture)
// cvReleaseCapture(&capture);
// timer->stop();
// ui.lblWebcamDisplay->setText("Webcam not found!\n Try the prev/next webcam");
// }
}
}
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment