diff --git a/dlls/wineps.drv/graphics.c b/dlls/wineps.drv/graphics.c index 711ab432ee6a00ead9acb5244a81ee027f1e6720..7fa07273fbe4247704e71a48cce69a853d753e7c 100644 --- a/dlls/wineps.drv/graphics.c +++ b/dlls/wineps.drv/graphics.c @@ -516,7 +516,11 @@ static BOOL paint_path( PHYSDEV dev, BOOL stroke, BOOL fill ) int i, size = GetPath( dev->hdc, NULL, NULL, 0 ); if (size == -1) return FALSE; - if (!size) return TRUE; + if (!size) + { + AbortPath( dev->hdc ); + return TRUE; + } points = HeapAlloc( GetProcessHeap(), 0, size * sizeof(*points) ); types = HeapAlloc( GetProcessHeap(), 0, size * sizeof(*types) ); if (!points || !types) goto done; @@ -549,6 +553,7 @@ static BOOL paint_path( PHYSDEV dev, BOOL stroke, BOOL fill ) if (stroke) PSDRV_DrawLine(dev); else PSDRV_WriteNewPath(dev); PSDRV_ResetClip(dev); + AbortPath( dev->hdc ); done: HeapFree( GetProcessHeap(), 0, points );