Skip to content
Permalink
Browse files

qgsmesh3dentity_p.cpp: fix memleaks in error code path

  • Loading branch information
rouault committed Jun 1, 2020
1 parent a8de679 commit 2c75d8790d56aa30c385c9de817bfc71f9ff9b3c
Showing with 2 additions and 4 deletions.
  1. +2 −4 src/3d/mesh/qgsmesh3dentity_p.cpp
@@ -49,11 +49,10 @@ void QgsMesh3dEntity::build()

void QgsMeshDataset3dEntity::buildGeometry()
{
Qt3DRender::QGeometryRenderer *mesh = new Qt3DRender::QGeometryRenderer;

if ( !layer() )
return;

Qt3DRender::QGeometryRenderer *mesh = new Qt3DRender::QGeometryRenderer;
mesh->setGeometry( new QgsMeshDataset3dGeometry( layer(), mMapSettings.temporalRange(), mMapSettings.origin(), mSymbol, mesh ) );
addComponent( mesh );
}
@@ -82,11 +81,10 @@ QgsMesh3dTerrainTileEntity::QgsMesh3dTerrainTileEntity( const Qgs3DMapSettings &

void QgsMesh3dTerrainTileEntity::buildGeometry()
{
Qt3DRender::QGeometryRenderer *mesh = new Qt3DRender::QGeometryRenderer;

if ( !layer() )
return;

Qt3DRender::QGeometryRenderer *mesh = new Qt3DRender::QGeometryRenderer;
mesh->setGeometry( new QgsMeshTerrain3dGeometry( layer(), mMapSettings.origin(), mSymbol, mesh ) );
addComponent( mesh );
}

0 comments on commit 2c75d87

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