mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
sw_engine/stroke: hotfix the memory access violation
ensure that the number of contour/close data is properly paired. issue: https://github.com/thorvg/thorvg/issues/2129
This commit is contained in:
parent
287e6d33d2
commit
a4a585d8f0
1 changed files with 1 additions and 0 deletions
|
@ -33,6 +33,7 @@ static bool _outlineBegin(SwOutline& outline)
|
|||
//Make a contour if lineTo/curveTo without calling close or moveTo beforehand.
|
||||
if (outline.pts.empty()) return false;
|
||||
outline.cntrs.push(outline.pts.count - 1);
|
||||
outline.closed.push(false);
|
||||
outline.pts.push(outline.pts[outline.cntrs.last()]);
|
||||
outline.types.push(SW_CURVE_TYPE_POINT);
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue