From d313d22b18d68533e9b4fe077477c7a5bc71eadf Mon Sep 17 00:00:00 2001 From: James Tabor Date: Wed, 28 Nov 2007 08:35:47 +0000 Subject: [PATCH] Check first to see if the DC handle is dead, if so return true. svn path=/trunk/; revision=30833 --- reactos/subsystems/win32/win32k/objects/dc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reactos/subsystems/win32/win32k/objects/dc.c b/reactos/subsystems/win32/win32k/objects/dc.c index a27e395fd11..14108058404 100644 --- a/reactos/subsystems/win32/win32k/objects/dc.c +++ b/reactos/subsystems/win32/win32k/objects/dc.c @@ -941,6 +941,8 @@ NtGdiDeleteObjectApp(HANDLE DCHandle) if (GDI_HANDLE_GET_TYPE(DCHandle) != GDI_OBJECT_TYPE_DC) return NtGdiDeleteObject((HGDIOBJ) DCHandle); + if(IsObjectDead((HGDIOBJ)DCHandle)) return TRUE; + if (!GDIOBJ_OwnedByCurrentProcess(GdiHandleTable, DCHandle)) { SetLastWin32Error(ERROR_INVALID_HANDLE);