Skip to content

Commit

Permalink
[composer] Check if attribute index is valid when reading attribute t…
Browse files Browse the repository at this point in the history
…able fields from pre 2.4 projects (refs #10482)
  • Loading branch information
nyalldawson committed Jun 7, 2014
1 parent d38ba92 commit a5c0e7e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/composer/qgscomposerattributetable.cpp
Expand Up @@ -274,6 +274,10 @@ void QgsComposerAttributeTable::setDisplayAttributes( const QSet<int>& attr, boo
for ( ; attIt != attr.constEnd(); ++attIt )
{
int attrIdx = ( *attIt );
if ( !fields.exists( attrIdx ) )
{
continue;
}
QString currentAlias = mVectorLayer->attributeDisplayName( attrIdx );
QgsComposerTableColumn* col = new QgsComposerTableColumn;
col->setAttribute( fields[attrIdx].name() );
Expand Down

0 comments on commit a5c0e7e

Please sign in to comment.