GDIOBJ_ShareUnlockObjByPtr: Temporarily don't ASSERT, but print a backtrace when...
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 23 Mar 2009 19:11:37 +0000 (19:11 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 23 Mar 2009 19:11:37 +0000 (19:11 +0000)
svn path=/trunk/; revision=40189

reactos/subsystems/win32/win32k/include/gdiobj.h

index ba0068a..b3395a1 100644 (file)
@@ -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;
 }