d2d1: Properly set an error state when adding the vertex fails in d2d_geometry_sink_BeginFigure().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2016-12-05 13:16:02 +01:00 committed by Alexandre Julliard
parent d055d3d121
commit e37ba63d2f
1 changed files with 4 additions and 0 deletions

View File

@ -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;