Skip to content
Permalink
Browse files

Fix leak of symbol in QgsMesh3dSymbolWidget

  • Loading branch information
nyalldawson committed Nov 6, 2020
1 parent 465f2d9 commit d601b69e021e096a8818fc4a673e5a496c9413a9
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/app/3d/qgsmesh3dsymbolwidget.cpp
@@ -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
}

0 comments on commit d601b69

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