1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge pull request #7509 from lpea:camv4l_segfault

This commit is contained in:
Alexander Alekhin
2016-10-18 11:32:30 +00:00
+1 -1
View File
@@ -1849,7 +1849,7 @@ static void icvCloseCAM_V4L( CvCaptureCAM_V4L* capture ){
if (capture->deviceHandle != -1)
close(capture->deviceHandle);
if (capture->frame.imageData)
if (capture->frame_allocated && capture->frame.imageData)
cvFree(&capture->frame.imageData);
capture->deviceName.clear(); // flag that the capture is closed