Skip to content

Commit

Permalink
Merge pull request #37600 from m-kuhn/fix_trim_extend_crash
Browse files Browse the repository at this point in the history
Add safety check for layer pointer
  • Loading branch information
m-kuhn committed Jul 6, 2020
2 parents 398b55e + d9e086f commit 6597b4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgsmaptooltrimextendfeature.cpp
Expand Up @@ -87,7 +87,7 @@ void QgsMapToolTrimExtendFeature::canvasMoveEvent( QgsMapMouseEvent *e )
case StepLimit: case StepLimit:


match = mCanvas->snappingUtils()->snapToMap( mMapPoint, &filter, true ); match = mCanvas->snappingUtils()->snapToMap( mMapPoint, &filter, true );
if ( match.isValid() ) if ( match.isValid() && match.layer() )
{ {
mIs3DLayer = QgsWkbTypes::hasZ( match.layer()->wkbType() ); mIs3DLayer = QgsWkbTypes::hasZ( match.layer()->wkbType() );


Expand Down

0 comments on commit 6597b4a

Please sign in to comment.