Skip to content
Permalink
Browse files
[composer] Check if attribute index is valid when reading attribute t…
…able fields from pre 2.4 projects (refs #10482)
  • Loading branch information
nyalldawson committed Jun 7, 2014
1 parent d38ba92 commit a5c0e7edbff0ad84d3f54b485a65c0a3dd75b530
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/composer/qgscomposerattributetable.cpp
@@ -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() );

0 comments on commit a5c0e7e

Please sign in to comment.