From 1a98aabcd1a92c69adaaa5350e75b7399ed5e8af Mon Sep 17 00:00:00 2001 From: James Tabor Date: Fri, 9 Nov 2007 18:05:41 +0000 Subject: [PATCH] No need for dca here if the ScreenDeviceContext is set inaccessible. So free the dca. svn path=/trunk/; revision=30304 --- reactos/subsystems/win32/win32k/ntuser/winsta.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reactos/subsystems/win32/win32k/ntuser/winsta.c b/reactos/subsystems/win32/win32k/ntuser/winsta.c index 220e4923fd3..8fd137d3beb 100644 --- a/reactos/subsystems/win32/win32k/ntuser/winsta.c +++ b/reactos/subsystems/win32/win32k/ntuser/winsta.c @@ -304,7 +304,8 @@ co_IntInitializeDesktopGraphics(VOID) IntDestroyPrimarySurface(); return FALSE; } - DC_SetOwnership(ScreenDeviceContext, NULL); + DC_FreeDcAttr(ScreenDeviceContext); // Free the dcattr! + DC_SetOwnership(ScreenDeviceContext, NULL); // This hDC is inaccessible! /* Setup the cursor */ co_IntLoadDefaultCursors(); @@ -316,7 +317,7 @@ VOID FASTCALL IntEndDesktopGraphics(VOID) { if (NULL != ScreenDeviceContext) - { + { // No need to allocate a new dcattr. DC_SetOwnership(ScreenDeviceContext, PsGetCurrentProcess()); NtGdiDeleteObjectApp(ScreenDeviceContext); ScreenDeviceContext = NULL;