We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4db8d02 commit d1edce0Copy full SHA for d1edce0
src/dbg/handle.h
@@ -18,10 +18,13 @@ class Handle
18
19
void Close()
20
{
21
- DWORD dwFlags = 0;
22
- if(GetHandleInformation(mHandle, &dwFlags) && !(dwFlags & HANDLE_FLAG_PROTECT_FROM_CLOSE))
23
- CloseHandle(mHandle);
24
- mHandle = INVALID_HANDLE_VALUE;
+ if(mHandle != INVALID_HANDLE_VALUE)
+ {
+ DWORD dwFlags = 0;
+ if(GetHandleInformation(mHandle, &dwFlags) && !(dwFlags & HANDLE_FLAG_PROTECT_FROM_CLOSE))
25
+ CloseHandle(mHandle);
26
+ mHandle = INVALID_HANDLE_VALUE;
27
+ }
28
}
29
30
const HANDLE & operator=(const HANDLE & h)
0 commit comments