Skip to content
Permalink
Browse files

Merge pull request #8689 from m-kuhn/prevent_crash

Safety guard to prevent crashes
  • Loading branch information
m-kuhn committed Dec 17, 2018
2 parents cbe7ac6 + 6f63957 commit bebc34b4b8a27bf325d65f9967b46429d3f79170
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/providers/postgres/qgspostgresprovider.cpp
@@ -2700,7 +2700,9 @@ bool QgsPostgresProvider::changeAttributeValues( const QgsChangedAttributesMap &
{
QVariantList k = mShared->removeFid( fid );

for ( int i = 0; i < mPrimaryKeyAttrs.size(); i++ )
int keyCount = std::min( mPrimaryKeyAttrs.size(), k.size() );

for ( int i = 0; i < keyCount; i++ )
{
int idx = mPrimaryKeyAttrs.at( i );
if ( !attrs.contains( idx ) )

0 comments on commit bebc34b

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