Skip to content
Permalink
Browse files

[3d] Fix crash in terrain generator if DEM raster layer is missing

(cherry picked from commit 685806b)
  • Loading branch information
wonder-sk authored and nyalldawson committed Nov 4, 2018
1 parent bacbcf6 commit 1db7a29e664fbdc739a8bfa43306789f8c809eb9
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/3d/terrain/qgsdemterraingenerator.cpp
@@ -66,7 +66,10 @@ QgsRectangle QgsDemTerrainGenerator::extent() const
float QgsDemTerrainGenerator::heightAt( double x, double y, const Qgs3DMapSettings &map ) const
{
Q_UNUSED( map );
return mHeightMapGenerator->heightAt( x, y );
if ( mHeightMapGenerator )
return mHeightMapGenerator->heightAt( x, y );
else
return 0;
}

void QgsDemTerrainGenerator::writeXml( QDomElement &elem ) const

0 comments on commit 1db7a29

Please sign in to comment.
You can’t perform that action at this time.