Commit bc44b3f6 authored by Alexandre Julliard's avatar Alexandre Julliard

gdiplus: Avoid using PathToRegion with an empty path.

parent e0f3f020
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment