d2d1: Properly handle the candidate being the last vertex before the base edge origin in d2d_cdt_fixup().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
This commit is contained in:
Henri Verbeet 2015-10-06 18:48:21 +02:00 committed by Alexandre Julliard
parent c5480a8810
commit f35bfff4fc
1 changed files with 6 additions and 1 deletions

View File

@ -712,7 +712,12 @@ static BOOL d2d_cdt_fixup(struct d2d_cdt *cdt, const struct d2d_cdt_edge_ref *ba
if (count > 1) if (count > 1)
{ {
if (!d2d_cdt_connect(cdt, &new_base, &candidate, base_edge)) d2d_cdt_edge_next_left(cdt, &next, &candidate);
if (d2d_cdt_edge_destination(cdt, &next) == d2d_cdt_edge_origin(cdt, base_edge))
d2d_cdt_edge_next_left(cdt, &next, base_edge);
else
next = *base_edge;
if (!d2d_cdt_connect(cdt, &new_base, &candidate, &next))
return FALSE; return FALSE;
if (!d2d_cdt_fixup(cdt, &new_base)) if (!d2d_cdt_fixup(cdt, &new_base))
return FALSE; return FALSE;