From 05945bf00eef1196187ad2690244bea0ad255d6f Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Tue, 27 Oct 2015 16:26:24 +0300 Subject: [PATCH] fixed case when grabbing failed --- modules/highgui/src/cap_images.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/highgui/src/cap_images.cpp b/modules/highgui/src/cap_images.cpp index f6abc3a107..b63cc7552a 100644 --- a/modules/highgui/src/cap_images.cpp +++ b/modules/highgui/src/cap_images.cpp @@ -120,7 +120,7 @@ bool CvCapture_Images::grabFrame() grabbedInOpen = false; ++currentframe; - return true; + return frame != NULL; } cvReleaseImage(&frame); @@ -128,7 +128,7 @@ bool CvCapture_Images::grabFrame() if( frame ) currentframe++; - return frame != 0; + return frame != NULL; } IplImage* CvCapture_Images::retrieveFrame(int)