wg_engine: fix segmentation fault on windows with SVG examples

Some SVG files fails during tesselation on windows.
Fixed
This commit is contained in:
Sergii Liebodkin 2025-01-23 16:48:21 +00:00 committed by Hermet Park
parent b8f2e3815a
commit 83eb89c5c9

View file

@ -241,6 +241,8 @@ struct WgVertexBufferInd
size_t vcount = 0;
size_t icount = 0;
float tscale = 1.0f;
// intermediate buffer for stroke dashing
WgVertexBuffer dashed;
// reset buffer
void reset(float scale)
@ -284,7 +286,6 @@ struct WgVertexBufferInd
void appendStrokesDashed(const WgVertexBuffer& buff, const RenderStroke* rstroke)
{
// dashed buffer
WgVertexBuffer dashed;
dashed.reset(tscale);
// ignore single points polyline
if (buff.vcount < 2) return;