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
This commit is contained in:
Timo Kreuzer 2009-03-23 19:11:37 +00:00
parent d34ef92b8b
commit 3b14a5465d

View file

@ -104,7 +104,13 @@ FORCEINLINE
GDIOBJ_ShareUnlockObjByPtr(POBJ Object) GDIOBJ_ShareUnlockObjByPtr(POBJ Object)
{ {
INT cLocks = InterlockedDecrement((PLONG)&Object->ulShareCount); 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; return cLocks;
} }