From e37ba63d2f0bc5b7383d6c751901a7a6b53453bf Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 5 Dec 2016 13:16:02 +0100 Subject: [PATCH] d2d1: Properly set an error state when adding the vertex fails in d2d_geometry_sink_BeginFigure(). Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d2d1/geometry.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/d2d1/geometry.c b/dlls/d2d1/geometry.c index afbf3394c65..cb6fab819e5 100644 --- a/dlls/d2d1/geometry.c +++ b/dlls/d2d1/geometry.c @@ -1777,7 +1777,11 @@ static void STDMETHODCALLTYPE d2d_geometry_sink_BeginFigure(ID2D1GeometrySink *i } if (!d2d_figure_add_vertex(&geometry->u.path.figures[geometry->u.path.figure_count - 1], start_point)) + { ERR("Failed to add vertex.\n"); + geometry->u.path.state = D2D_GEOMETRY_STATE_ERROR; + return; + } geometry->u.path.state = D2D_GEOMETRY_STATE_FIGURE; ++geometry->u.path.segment_count;