Skip to content

Commit 3c0cb2e

Browse files
committed
Fix crash when right clicking on a feature in form view and no
layer actions are set
1 parent cdf05ac commit 3c0cb2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gui/attributetable/qgsfeaturelistview.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ void QgsFeatureListView::contextMenuEvent( QContextMenuEvent *event )
315315
{
316316
QgsFeature feature = mModel->data( index, QgsFeatureListModel::FeatureRole ).value<QgsFeature>();
317317

318-
QgsActionMenu menu( mModel->layerCache()->layer(), &feature, this );
319-
menu.exec( event->globalPos() );
318+
QgsActionMenu* menu = new QgsActionMenu( mModel->layerCache()->layer(), &feature, this );
319+
menu->exec( event->globalPos() );
320320
}
321321
}
322322

0 commit comments

Comments
 (0)