From 5b3d4bc5b12cb2bf6d028be6cd971ef9a6e3599b Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Fri, 18 Feb 2005 12:59:30 +0000 Subject: [PATCH] only dump stack traces when GDI_DEBUG is enabled svn path=/trunk/; revision=13629 --- reactos/subsys/win32k/objects/gdiobj.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reactos/subsys/win32k/objects/gdiobj.c b/reactos/subsys/win32k/objects/gdiobj.c index f883af8d4a3..70190b918cb 100644 --- a/reactos/subsys/win32k/objects/gdiobj.c +++ b/reactos/subsys/win32k/objects/gdiobj.c @@ -801,13 +801,17 @@ LockHandle: if((EntryType & ~GDI_HANDLE_REUSE_MASK) == 0) { DPRINT1("Attempted to lock object 0x%x that is deleted!\n", hObj); +#ifdef GDI_DEBUG KeRosDumpStackFrames ( NULL, 20 ); +#endif } else { DPRINT1("Attempted to lock object 0x%x, type mismatch (0x%x : 0x%x)\n", hObj, EntryType & ~GDI_HANDLE_REUSE_MASK, ExpectedType & ~GDI_HANDLE_REUSE_MASK); +#ifdef GDI_DEBUG KeRosDumpStackFrames ( NULL, 20 ); +#endif } #ifdef GDI_DEBUG DPRINT1("-> called from %s:%i\n", file, line); @@ -839,8 +843,8 @@ LockHandle: else { DPRINT1("Attempted to lock foreign handle: 0x%x, Owner: 0x%x locked: 0x%x Caller: 0x%x, stockobj: 0x%x\n", hObj, (ULONG_PTR)PrevProcId & ~0x1, (ULONG_PTR)PrevProcId & 0x1, PsGetCurrentProcessId(), GDI_HANDLE_IS_STOCKOBJ(hObj)); - KeRosDumpStackFrames ( NULL, 20 ); #ifdef GDI_DEBUG + KeRosDumpStackFrames ( NULL, 20 ); DPRINT1("-> called from %s:%i\n", file, line); #endif }