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.

pull/752/head
Karl-Heinz Zimmer 12 years ago
parent a2d89aced4
commit 2122627877
  1. 1
      modules/highgui/src/cap_libv4l.cpp

@ -1714,6 +1714,7 @@ static void icvCloseCAM_V4L( CvCaptureCAM_V4L* capture ){
#endif
free(capture->deviceName);
capture->deviceName = NULL;
//v4l2_free_ranges(capture);
//cvFree((void **)capture);
}

Loading…
Cancel
Save