[NtGdi]
[reactos.git] / reactos / win32ss / gdi / ntgdi / path.c
index 727836d..61de877 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * PROJECT:         ReactOS win32 kernel mode subsystem
  * LICENSE:         GPL - See COPYING in the top level directory
- * FILE:            subsystems/win32/win32k/objects/path.c
+ * FILE:            win32ss/gdi/ntgdi/path.c
  * PURPOSE:         Graphics paths (BeginPath, EndPath etc.)
  * PROGRAMMER:      Copyright 1997, 1998 Martin Boehme
  *                            1999 Huw D M Davies
@@ -1644,6 +1644,7 @@ PATH_StrokePath(
                         if (!Realloc)
                         {
                             DPRINT1("Can't allocate pool!\n");
+                            ExFreePoolWithTag(pBzrPts, TAG_BEZIER);
                             goto end;
                         }
 
@@ -1701,7 +1702,7 @@ end:
         POINT pt;
         IntGetCurrentPositionEx(dc, &pt);
         IntDPtoLP(dc, &pt, 1);
-        IntGdiMoveToEx(dc, pt.x, pt.y, NULL, FALSE);
+        IntGdiMoveToEx(dc, pt.x, pt.y, NULL);
     }
     DPRINT("Leave %s, ret=%d\n", __FUNCTION__, ret);
     return ret;
@@ -2416,6 +2417,11 @@ NtGdiBeginPath(HDC  hDC)
     /* Make sure that path is empty */
     PATH_EmptyPath(pPath);
 
+    pPath->numEntriesAllocated = NUM_ENTRIES_INITIAL;
+
+    pPath->pPoints = (POINT *)ExAllocatePoolWithTag(PagedPool, NUM_ENTRIES_INITIAL * sizeof(POINT), TAG_PATH);
+    pPath->pFlags  =  (BYTE *)ExAllocatePoolWithTag(PagedPool, NUM_ENTRIES_INITIAL * sizeof(BYTE),  TAG_PATH);
+
     /* Initialize variables for new path */
     pPath->newStroke = TRUE;
     pPath->state = PATH_Open;