From 3b14a5465d102cc5b8ecd736d9d0f104a92a19d1 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 23 Mar 2009 19:11:37 +0000 Subject: [PATCH] GDIOBJ_ShareUnlockObjByPtr: Temporarily don't ASSERT, but print a backtrace when trying to unlock an object that wasn't locked. svn path=/trunk/; revision=40189 --- reactos/subsystems/win32/win32k/include/gdiobj.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/reactos/subsystems/win32/win32k/include/gdiobj.h b/reactos/subsystems/win32/win32k/include/gdiobj.h index ba0068a31b1..b3395a18865 100644 --- a/reactos/subsystems/win32/win32k/include/gdiobj.h +++ b/reactos/subsystems/win32/win32k/include/gdiobj.h @@ -104,7 +104,13 @@ FORCEINLINE GDIOBJ_ShareUnlockObjByPtr(POBJ Object) { INT cLocks = InterlockedDecrement((PLONG)&Object->ulShareCount); - ASSERT(cLocks >= 0); +// ASSERT(cLocks >= 0); + if (cLocks < 0) + { + DbgPrint("Unlocked object %p, that was not locked!\n", Object->hHmgr); + KdSystemDebugControl(TAG('R', 'o', 's', 'D'), NULL, 20, NULL, 0, NULL, KernelMode); + InterlockedIncrement((PLONG)&Object->ulShareCount); + } return cLocks; }