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.
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user