提交 df2b5918 编写于 作者: G Guillaume Jacob

videoio: fix segfault if CONVERT_RGB is false (issue #7465)

上级 07711e40
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册