Skip to content
Permalink
Browse files

Use QgsFields::rename member funcion in QgsMemoryProvider::renameAttr…

…ibutes instead of renaming manually.

This was causing some crashes after renaming some fields because the internal hashmap nameToIndex was not updated properly.

fix #33488
  • Loading branch information
obrix
obrix committed Jan 22, 2020
1 parent c4a2bb0 commit 2ddcf006e6079db700bc716ef641124adfa6f647
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/providers/memory/qgsmemoryprovider.cpp
@@ -512,7 +512,7 @@ bool QgsMemoryProvider::renameAttributes( const QgsFieldNameMap &renamedAttribut
continue;
}

mFields[ fieldIndex ].setName( renameIt.value() );
mFields.rename( fieldIndex, renameIt.value() );
}
return result;
}

0 comments on commit 2ddcf00

Please sign in to comment.
You can’t perform that action at this time.