Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix potential -1 value passed to QVector::at
  • Loading branch information
nyalldawson authored and github-actions[bot] committed Apr 17, 2023
1 parent e5a9b26 commit 2d2e079
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/mesh/qgstopologicalmesh.cpp
Expand Up @@ -2238,6 +2238,8 @@ QgsTopologicalMesh::Changes QgsTopologicalMesh::splitFace( int faceIndex )
}

Changes changes;
if ( splitVertexPos == -1 )
return changes;

const QgsMeshFace newFace1 = {face.at( splitVertexPos ),
face.at( ( splitVertexPos + 1 ) % faceSize ),
Expand Down

0 comments on commit 2d2e079

Please sign in to comment.