Skip to content
Permalink
Browse files

Fix leak in mesh 3d renderer

  • Loading branch information
nyalldawson committed Jun 17, 2020
1 parent 7c6286f commit 4b5a63d11b7ea5baf6931c8abf86e132c706c1be
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/3d/mesh/qgsmesh3dmaterial_p.cpp
@@ -330,7 +330,7 @@ void QgsMesh3dMaterial::configureArrows( QgsMeshLayer *layer, const QgsDateTimeR
QVector<QgsVector> vectors;
QSize gridSize;
QgsPointXY minCorner;
Qt3DRender::QParameter *arrowsEnabledParameter = new Qt3DRender::QParameter( "arrowsEnabled", nullptr );
std::unique_ptr< Qt3DRender::QParameter > arrowsEnabledParameter = qgis::make_unique< Qt3DRender::QParameter >( "arrowsEnabled", nullptr );
if ( mMagnitudeType != MagnitudeType::ScalarDataSet || !mSymbol.arrowsEnabled() || meta.isScalar() || !datasetIndex.isValid() )
arrowsEnabledParameter->setValue( false );
else
@@ -371,7 +371,7 @@ void QgsMesh3dMaterial::configureArrows( QgsMeshLayer *layer, const QgsDateTimeR
return;
}

mTechnique->addParameter( arrowsEnabledParameter ) ;
mTechnique->addParameter( arrowsEnabledParameter.release() ) ;

Qt3DRender::QTexture2D *arrowsGridTexture = new Qt3DRender::QTexture2D( this );
arrowsGridTexture->addTextureImage( new ArrowsGridTexture( vectors, gridSize, mSymbol.arrowsFixedSize(), meta.maximum() ) );

0 comments on commit 4b5a63d

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