Commit 21226278 authored by Karl-Heinz Zimmer's avatar Karl-Heinz Zimmer

Set ptr to NULL, so this method can be called repeatedly. This fixes a crash…

Set ptr to NULL, so this method can be called repeatedly. This fixes a crash after unplugging web cam and trying to re-scan the cameras.
parent a2d89ace
...@@ -1714,6 +1714,7 @@ static void icvCloseCAM_V4L( CvCaptureCAM_V4L* capture ){ ...@@ -1714,6 +1714,7 @@ static void icvCloseCAM_V4L( CvCaptureCAM_V4L* capture ){
#endif #endif
free(capture->deviceName); free(capture->deviceName);
capture->deviceName = NULL;
//v4l2_free_ranges(capture); //v4l2_free_ranges(capture);
//cvFree((void **)capture); //cvFree((void **)capture);
} }
......
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