diff --git a/reactos/win32ss/gdi/ntgdi/gdiobj.c b/reactos/win32ss/gdi/ntgdi/gdiobj.c index c03d5c14d44..e96eb7006fd 100644 --- a/reactos/win32ss/gdi/ntgdi/gdiobj.c +++ b/reactos/win32ss/gdi/ntgdi/gdiobj.c @@ -559,6 +559,10 @@ GDIOBJ_vDereferenceObject(POBJ pobj) if (ulIndex) { /* Decrement reference count */ + if ((gpaulRefCount[ulIndex] & REF_MASK_COUNT) == 0) + { + DBG_DUMP_EVENT_LIST(&pobj->slhLog); + } ASSERT((gpaulRefCount[ulIndex] & REF_MASK_COUNT) > 0); cRefs = InterlockedDecrement((LONG*)&gpaulRefCount[ulIndex]); DBG_LOGEVENT(&pobj->slhLog, EVENT_DEREFERENCE, cRefs);