From bc0269a715a78be7a4edb2a347a818aa4658353f Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Fri, 7 Mar 2008 17:13:02 +0000 Subject: [PATCH] - UGLY HACK dedicated to Timo Kreuzer: Please, fix this issue. Happens only in 2nd stage during shutdown. svn path=/trunk/; revision=32603 --- reactos/subsystems/win32/win32k/objects/gdiobj.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/reactos/subsystems/win32/win32k/objects/gdiobj.c b/reactos/subsystems/win32/win32k/objects/gdiobj.c index b54a954240b..06bb44109e9 100644 --- a/reactos/subsystems/win32/win32k/objects/gdiobj.c +++ b/reactos/subsystems/win32/win32k/objects/gdiobj.c @@ -1318,6 +1318,16 @@ LockHandle: { POBJ Object = Entry->KernelData; + /* HACK: Introduced very recently, probably by Timo's changes */ + if ((ULONG_PTR)Object < 0x80000000) + { + DPRINT1("KernelData is invalid (%p) for Entry %p!!!\n", + Object, Entry); + + /* Hopefully someone is going to solve this issue */ + return; + } + PrevThread = Object->Tid; if (Object->cExclusiveLock == 0 || PrevThread == Thread) {