diff --git a/reactos/lib/kernel32/debug/output.c b/reactos/lib/kernel32/debug/output.c index 517b40ab0c4..3394047c041 100644 --- a/reactos/lib/kernel32/debug/output.c +++ b/reactos/lib/kernel32/debug/output.c @@ -456,7 +456,8 @@ VOID WINAPI OutputDebugStringA(LPCSTR _OutputString) if(hDBMonDataReady) CloseHandle(hDBMonDataReady); /* leave the critical section */ - ReleaseMutex(hDBMonMutex); + if(hDBMonDataReady != NULL) + ReleaseMutex(hDBMonMutex); #if 0 } }