Skip to content

Commit f3eeed9

Browse files
committedNov 8, 2014
fix PyQgsVectorLayer test
1 parent 9b01b2e commit f3eeed9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎src/core/qgsvectorlayer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,6 +2119,9 @@ QString QgsVectorLayer::attributeDisplayName( int attributeIndex ) const
21192119

21202120
bool QgsVectorLayer::deleteAttribute( int index )
21212121
{
2122+
if ( index < 0 || index >= pendingFields().count() )
2123+
return false;
2124+
21222125
if ( mUpdatedFields.fieldOrigin( index ) == QgsFields::OriginExpression )
21232126
{
21242127
removeExpressionField( index );

0 commit comments

Comments
 (0)
Please sign in to comment.