Skip to content

Commit

Permalink
Fix leak of symbol in QgsMesh3dSymbolWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 6, 2020
1 parent 465f2d9 commit d601b69
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/3d/qgsmesh3dsymbolwidget.cpp
Expand Up @@ -155,7 +155,10 @@ void QgsMesh3dSymbolWidget::setLayer( QgsMeshLayer *meshLayer, bool updateSymbol
}
}

setSymbol( new QgsMesh3DSymbol() );
std::unique_ptr< QgsMesh3DSymbol > defaultSymbol = qgis::make_unique< QgsMesh3DSymbol >();
// set symbol does not take ownership!
setSymbol( defaultSymbol.get() );

reloadColorRampShaderMinMax(); //As the symbol is new, the Color ramp shader needs to be initialized with min max value
}

Expand Down

0 comments on commit d601b69

Please sign in to comment.