Skip to content

Commit

Permalink
Merge pull request #1457 from rouault/fix_crash_attr_table_no_attr_col
Browse files Browse the repository at this point in the history
Fix crash when opening entity form from layer without attribute
  • Loading branch information
m-kuhn committed Jun 18, 2014
2 parents 60d93b3 + ec82076 commit 4ded76f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/gui/attributetable/qgsfeaturelistview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,14 @@ void QgsFeatureListView::editSelectionChanged( QItemSelection deselected, QItemS
QItemSelection currentSelection = mCurrentEditSelectionModel->selection();
if ( currentSelection.size() == 1 )
{
QgsFeature feat;
mModel->featureByIndex( mModel->mapFromMaster( currentSelection.indexes().first() ), feat );
QModelIndexList indexList = currentSelection.indexes();
if ( !indexList.isEmpty() )
{
QgsFeature feat;
mModel->featureByIndex( mModel->mapFromMaster( indexList.first() ), feat );

emit currentEditSelectionChanged( feat );
emit currentEditSelectionChanged( feat );
}
}
}

Expand Down

0 comments on commit 4ded76f

Please sign in to comment.