[ros-diffs] [jimtabor] 33858: This should do it for pen. Tested the same with wine tests.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Wed Jun 4 23:05:18 CEST 2008


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/objects/pen.c?rev=33858&r1=33857&r2=33858&view=diff
==============================================================================
--- 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;
 }
 



More information about the Ros-diffs mailing list