Skip to content

Commit

Permalink
fix crash in editing without current layer
Browse files Browse the repository at this point in the history
fixes #60408
  • Loading branch information
3nids authored and github-actions[bot] committed Feb 3, 2025
1 parent 44007b4 commit 4f845ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/maptools/qgsmaptoolcapture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ void QgsMapToolCapture::setCurrentShapeMapTool( const QgsMapToolShapeMetadata *s
void QgsMapToolCapture::cadCanvasMoveEvent( QgsMapMouseEvent *e )
{
// If we are adding a record to a non-spatial layer, just return
if ( mCaptureModeFromLayer && !canvas()->currentLayer()->isSpatial() )
if ( mCaptureModeFromLayer && ( !canvas()->currentLayer() || !canvas()->currentLayer()->isSpatial() ) )
return;

QgsMapToolAdvancedDigitizing::cadCanvasMoveEvent( e );
Expand Down

0 comments on commit 4f845ab

Please sign in to comment.