Module: wine Branch: master Commit: bc44b3f60d3df213f3a55d6f0878c019932bebfd URL: http://source.winehq.org/git/wine.git/?a=commit;h=bc44b3f60d3df213f3a55d6f08...
Author: Alexandre Julliard julliard@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@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);