From 81ac7eb29df53309910ecd49e29430a8d8fe3dc8 Mon Sep 17 00:00:00 2001 From: uclaros Date: Sun, 21 Aug 2022 15:08:49 +0300 Subject: [PATCH] don't look for features if the layer is not spatial --- src/app/qgsmaptoolselect.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/qgsmaptoolselect.cpp b/src/app/qgsmaptoolselect.cpp index a67c0f3db71..0d131801aa6 100644 --- a/src/app/qgsmaptoolselect.cpp +++ b/src/app/qgsmaptoolselect.cpp @@ -150,6 +150,8 @@ bool QgsMapToolSelect::populateContextMenuWithEvent( QMenu *menu, QgsMapMouseEve return false; QgsVectorLayer *vlayer = qobject_cast< QgsVectorLayer * >( layer ); + if ( !vlayer->isSpatial() ) + return false; menu->addSeparator();