projects
/
profile
/
ivi
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e25dca2
)
Clarified code.
author
Adi Shavit
<adishavit@gmail.com>
Thu, 3 Jul 2014 19:45:11 +0000
(22:45 +0300)
committer
Adi Shavit
<adishavit@gmail.com>
Thu, 3 Jul 2014 19:45:11 +0000
(22:45 +0300)
modules/highgui/src/window_w32.cpp
patch
|
blob
|
history
diff --git
a/modules/highgui/src/window_w32.cpp
b/modules/highgui/src/window_w32.cpp
index
658bb4f
..
bcf1bae
100644
(file)
--- 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;
}