Skip to content
Permalink
Browse files

Safety guard to prevent crashes

  • Loading branch information
m-kuhn committed Dec 17, 2018
1 parent c7cb5a8 commit 6f6395779765658e2a81d5b845583880efe53cb1
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 6f63957

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