Fixed cameras segfault (patch #1771)
authorAlexander Reshetnikov <no@email>
Thu, 12 Apr 2012 12:11:43 +0000 (12:11 +0000)
committerAlexander Reshetnikov <no@email>
Thu, 12 Apr 2012 12:11:43 +0000 (12:11 +0000)
modules/highgui/src/cap_pvapi.cpp

index 31518f8..1020e17 100644 (file)
@@ -358,6 +358,8 @@ CvCapture* cvCreateCameraCapture_PvAPI( int index )
 {
     CvCaptureCAM_PvAPI* capture = new CvCaptureCAM_PvAPI;
 
+    memset(&capture->Camera, 0, sizeof(tCamera));
+
     if ( capture->open( index ))
         return capture;