From b8419654bd2f93dac48e04241e16ea7b61db9604 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Thu, 17 Mar 2005 23:16:12 +0000 Subject: [PATCH] Don't try to release mutex with NULL handle. Also prevent releasing the same mutex twice. svn path=/trunk/; revision=14168 --- reactos/lib/kernel32/debug/output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 } }