Alexandre Julliard : gdiplus: Avoid using PathToRegion with an empty path.
Alexandre Julliard
julliard at winehq.org
Wed Jun 15 11:39:42 CDT 2016
Module: wine
Branch: master
Commit: bc44b3f60d3df213f3a55d6f0878c019932bebfd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bc44b3f60d3df213f3a55d6f0878c019932bebfd
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Jun 16 00:36:37 2016 +0900
gdiplus: Avoid using PathToRegion with an empty path.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/gdiplus/region.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dlls/gdiplus/region.c b/dlls/gdiplus/region.c
index a0c0823..50cb46a 100644
--- a/dlls/gdiplus/region.c
+++ b/dlls/gdiplus/region.c
@@ -1114,6 +1114,12 @@ static GpStatus get_path_hrgn(GpPath *path, GpGraphics *graphics, HRGN *hrgn)
GpStatus stat;
INT save_state;
+ if (!path->pathdata.Count) /* PathToRegion doesn't support empty paths */
+ {
+ *hrgn = CreateRectRgn( 0, 0, 0, 0 );
+ return *hrgn ? Ok : OutOfMemory;
+ }
+
if (!graphics)
{
new_hdc = CreateCompatibleDC(0);
More information about the wine-cvs
mailing list