From d067749c217f3b60688fa191024231f31f8b0f42 Mon Sep 17 00:00:00 2001 From: WonderRico Date: Mon, 12 Aug 2013 11:19:53 +0200 Subject: [PATCH] fix _index / index --- modules/highgui/src/cap_dshow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/highgui/src/cap_dshow.cpp b/modules/highgui/src/cap_dshow.cpp index 4dca38797..606e52012 100644 --- a/modules/highgui/src/cap_dshow.cpp +++ b/modules/highgui/src/cap_dshow.cpp @@ -3170,7 +3170,7 @@ bool CvCaptureCAM_DShow::open( int _index ) devices = VI.listDevices(true); if (devices == 0) return false; - if (_index < 0 || index > devices-1) + if (_index < 0 || _index > devices-1) return false; VI.setupDevice(_index); if( !VI.isDeviceSetup(_index) )