From: Alexander Smorkalov Date: Mon, 10 Jun 2013 20:29:45 +0000 (-0700) Subject: Bug #3044 cap_dshow.cpp forgotten validity check fixed. X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1314^2~1254^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=956d8027efeccce0b3e595f556e3eae0bb867fd8;p=platform%2Fupstream%2Fopencv.git Bug #3044 cap_dshow.cpp forgotten validity check fixed. --- diff --git a/modules/highgui/src/cap_dshow.cpp b/modules/highgui/src/cap_dshow.cpp index 21fb947..b7cfbd9 100644 --- a/modules/highgui/src/cap_dshow.cpp +++ b/modules/highgui/src/cap_dshow.cpp @@ -3195,8 +3195,10 @@ IplImage* CvCaptureCAM_DShow::retrieveFrame(int) frame = cvCreateImage( cvSize(w,h), 8, 3 ); } - VI.getPixels( index, (uchar*)frame->imageData, false, true ); - return frame; + if (VI.getPixels( index, (uchar*)frame->imageData, false, true )) + return frame; + else + return NULL; } double CvCaptureCAM_DShow::getProperty( int property_id )