From cae2a5356320025401dac7e6b92e68d12016ae9c Mon Sep 17 00:00:00 2001 From: berak Date: Tue, 6 Nov 2018 11:43:58 +0100 Subject: [PATCH] highgui: fix broken waitKey() condition in window_w32 --- modules/highgui/src/window_w32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/highgui/src/window_w32.cpp b/modules/highgui/src/window_w32.cpp index a4ec2d51b6..e67fb4e187 100644 --- a/modules/highgui/src/window_w32.cpp +++ b/modules/highgui/src/window_w32.cpp @@ -1976,7 +1976,7 @@ cvWaitKey( int delay ) MSG message; int is_processed = 0; - if( delay <= 0 ) + if( (delay <= 0) && hg_windows) GetMessage(&message, 0, 0, 0); else if( PeekMessage(&message, 0, 0, 0, PM_REMOVE) == FALSE ) {