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 committed Apr 17, 2023
1 parent 22b3b2d commit 47d88e9
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 47d88e9

Please sign in to comment.