From b449bd5150076535e984805860fbe23484bec840 Mon Sep 17 00:00:00 2001 From: Adi Shavit Date: Thu, 3 Jul 2014 22:45:11 +0300 Subject: [PATCH] Clarified code. --- modules/highgui/src/window_w32.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/highgui/src/window_w32.cpp b/modules/highgui/src/window_w32.cpp index 658bb4f48..bcf1bae8b 100644 --- a/modules/highgui/src/window_w32.cpp +++ b/modules/highgui/src/window_w32.cpp @@ -1520,9 +1520,9 @@ static LRESULT CALLBACK HighGUIProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM ////////////////////////////////////////////////////////////////////////// // if handle is allocated (i.e. != 0) then clean-up. - memBM && ::DeleteObject(memBM); - memDC && ::DeleteDC(memDC); - hDC && ::ReleaseDC(hwnd, hDC); + if (memBM) ::DeleteObject(memBM); + if (memDC) ::DeleteDC(memDC); + if (hDC) ::ReleaseDC(hwnd, hDC); ::CloseClipboard(); break; }