We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 9b01b2e commit f3eeed9Copy full SHA for f3eeed9
src/core/qgsvectorlayer.cpp
@@ -2119,6 +2119,9 @@ QString QgsVectorLayer::attributeDisplayName( int attributeIndex ) const
2119
2120
bool QgsVectorLayer::deleteAttribute( int index )
2121
{
2122
+ if ( index < 0 || index >= pendingFields().count() )
2123
+ return false;
2124
+
2125
if ( mUpdatedFields.fieldOrigin( index ) == QgsFields::OriginExpression )
2126
2127
removeExpressionField( index );
0 commit comments