Skip to content

Commit

Permalink
Don't crash when default action is not set
Browse files Browse the repository at this point in the history
Fix #15092
  • Loading branch information
m-kuhn committed Jun 22, 2016
1 parent 803cbad commit f645b79
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5594,6 +5594,8 @@ void QgisApp::updateDefaultFeatureAction( QAction *action )
vlayer->actions()->setDefaultAction( index );
QgsMapLayerActionRegistry::instance()->setDefaultActionForLayer( vlayer, nullptr );

if ( index == -1 )
index = 0;
QgsAction a = vlayer->actions()->listActions().at( index );

if ( !a.name().isEmpty() )
Expand Down

0 comments on commit f645b79

Please sign in to comment.