Skip to content

Commit

Permalink
Fix Coverity null pointer dererence warning
Browse files Browse the repository at this point in the history
(cherry-picked from a3605b5)
  • Loading branch information
nyalldawson committed Apr 6, 2018
1 parent 6c0fae3 commit 2900ae2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/attributetable/qgsdualview.cpp
Expand Up @@ -571,7 +571,7 @@ void QgsDualView::viewWillShowContextMenu( QMenu *menu, const QModelIndex &atInd
if ( !action.runable() )
continue;

if ( !vl->isEditable() && action.isEnabledOnlyWhenEditable() )
if ( vl && !vl->isEditable() && action.isEnabledOnlyWhenEditable() )
continue;

QgsAttributeTableAction *a = new QgsAttributeTableAction( action.name(), this, action.id(), sourceIndex );
Expand Down

0 comments on commit 2900ae2

Please sign in to comment.