Merge pull request #7509 from lpea:camv4l_segfault

pull/7439/merge
Alexander Alekhin 9 years ago
commit 3a3dfcbdce
  1. 2
      modules/videoio/src/cap_v4l.cpp

@ -1849,7 +1849,7 @@ static void icvCloseCAM_V4L( CvCaptureCAM_V4L* capture ){
if (capture->deviceHandle != -1) if (capture->deviceHandle != -1)
close(capture->deviceHandle); close(capture->deviceHandle);
if (capture->frame.imageData) if (capture->frame_allocated && capture->frame.imageData)
cvFree(&capture->frame.imageData); cvFree(&capture->frame.imageData);
capture->deviceName.clear(); // flag that the capture is closed capture->deviceName.clear(); // flag that the capture is closed

Loading…
Cancel
Save