diff --git a/src/gui/elevation/qgselevationprofilecanvas.cpp b/src/gui/elevation/qgselevationprofilecanvas.cpp index 42b8726eab71..177cea911355 100644 --- a/src/gui/elevation/qgselevationprofilecanvas.cpp +++ b/src/gui/elevation/qgselevationprofilecanvas.cpp @@ -982,6 +982,9 @@ void QgsElevationProfileCanvas::onLayerProfileRendererPropertyChanged() void QgsElevationProfileCanvas::regenerateResultsForLayer() { + if ( !mCurrentJob ) + return; + if ( QgsMapLayer *layer = qobject_cast< QgsMapLayer * >( sender() ) ) { if ( QgsAbstractProfileSource *source = dynamic_cast< QgsAbstractProfileSource * >( layer ) )