mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 05:00:30 +00:00
gdiplus: Avoid a devision by zero when a being added segment length is 0.
This sometimes happens after GdipAddPathLine + GdipWidenPath.
This commit is contained in:
parent
9bcd1cdd31
commit
22a7458a3f
@ -1702,6 +1702,13 @@ static void add_bevel_point(const GpPointF *endpoint, const GpPointF *nextpoint,
|
||||
REAL distance = pen->width/2.0;
|
||||
REAL bevel_dx, bevel_dy;
|
||||
|
||||
if (segment_length == 0.0)
|
||||
{
|
||||
*last_point = add_path_list_node(*last_point, endpoint->X,
|
||||
endpoint->Y, PathPointTypeLine);
|
||||
return;
|
||||
}
|
||||
|
||||
if (right_side)
|
||||
{
|
||||
bevel_dx = -distance * segment_dy / segment_length;
|
||||
|
Loading…
Reference in New Issue
Block a user