d2d1: Check the vertex count again after duplicate removal in d2d_path_geometry_trian...
commit8718a23b2e5125189eccd0e4e495662e8e4081d6
authorHenri Verbeet <hverbeet@codeweavers.com>
Thu, 16 Sep 2021 14:01:51 +0000 (16 16:01 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 16 Sep 2021 20:22:44 +0000 (16 22:22 +0200)
tree3b8d5efa229e91438772633987df3a4ee753a136
parentc33618ffdda4464959765df92e5233ddd6033a34
d2d1: Check the vertex count again after duplicate removal in d2d_path_geometry_triangulate().

As the test shows, we can create geometries that have less than two vertices
after eliminating duplicates. Calling d2d_cdt_triangulate() on those would
lead to infinite recursion. In principle we could now get rid of the original
vertex count check, but it seems cheap enough that it's worth keeping in order
to avoid some unnecessary work in the somewhat more common case that we have
less than three vertices before duplicate removal.

Based on a patch by Changsheng Chen.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/d2d1/geometry.c
dlls/d2d1/tests/d2d1.c