Author: jimtabor
Date: Wed Jun 4 16:05:18 2008
New Revision: 33858
URL:
http://svn.reactos.org/svn/reactos?rev=33858&view=rev
Log:
This should do it for pen. Tested the same with wine tests.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/pen.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/pen.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/pen.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/pen.c [iso-8859-1] Wed Jun 4 16:05:18
2008
@@ -177,11 +177,7 @@
ExitCleanup:
SetLastWin32Error(ERROR_INVALID_PARAMETER);
- if (PenObject->pStyle)
- {
- ExFreePool(PenObject->pStyle);
- PenObject->pStyle = NULL;
- }
+ PenObject->pStyle = NULL;
PENOBJ_UnlockPen(PenObject);
if (bOldStylePen)
PENOBJ_FreePenByHandle(hPen);
@@ -343,7 +339,10 @@
cjDIB,
bOldStylePen,
hBrush);
-
+ if (!hPen && pSafeStyle)
+ {
+ ExFreePool(pSafeStyle);
+ }
return hPen;
}