bad memory allocation size fixed

This commit is contained in:
Uwe Rathmann 2022-10-18 17:36:55 +02:00
parent 4592ebfd3d
commit 0d49820cad

View File

@ -90,7 +90,8 @@ void QskStrokeNode::updateNode(
stroker.process( dashedVectorPath, effectivePen, {}, {} ); stroker.process( dashedVectorPath, effectivePen, {}, {} );
} }
d->geometry.allocate( stroker.vertexCount() ); // 2 vertices for each point
d->geometry.allocate( stroker.vertexCount() / 2 );
memcpy( d->geometry.vertexData(), stroker.vertices(), memcpy( d->geometry.vertexData(), stroker.vertices(),
stroker.vertexCount() * sizeof( float ) ); stroker.vertexCount() * sizeof( float ) );