mirror of https://github.com/qt/qt3d.git
SegmentVisitor: fix crash if vertexCount is 0
Change-Id: I97a981f65cad1e2f08f90b72adfbd4945cdc2f8b Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit26577c869f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit5a5b8438f4)
This commit is contained in:
parent
af19578563
commit
bc66fcb784
|
|
@ -150,6 +150,9 @@ void traverseSegmentStrip(Vertex *vertices,
|
|||
{
|
||||
uint i = 0;
|
||||
|
||||
if (vertexInfo.count < 1)
|
||||
return;
|
||||
|
||||
const uint verticesStride = vertexInfo.byteStride / sizeof(Vertex);
|
||||
const uint maxVerticesDataSize = qMin(vertexInfo.dataSize, 3U);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue