gdiplus: Avoid using PathToRegion with an empty path.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e0f3f020c0
commit
bc44b3f60d
|
@ -1114,6 +1114,12 @@ static GpStatus get_path_hrgn(GpPath *path, GpGraphics *graphics, HRGN *hrgn)
|
||||||
GpStatus stat;
|
GpStatus stat;
|
||||||
INT save_state;
|
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)
|
if (!graphics)
|
||||||
{
|
{
|
||||||
new_hdc = CreateCompatibleDC(0);
|
new_hdc = CreateCompatibleDC(0);
|
||||||
|
|
Loading…
Reference in New Issue