Fixed a potential segfault at program exit
This commit is contained in:
parent
d2b4a1ea5e
commit
86e6539af9
2 changed files with 7 additions and 6 deletions
|
@ -13,6 +13,7 @@ AtmosphereDefinition::AtmosphereDefinition(DefinitionNode *parent)
|
|||
daytime = new FloatNode(this, "daytime");
|
||||
humidity = new FloatNode(this, "humidity");
|
||||
sun_radius = new FloatNode(this, "sun_radius");
|
||||
sun_color = COLOR_RED;
|
||||
}
|
||||
|
||||
AtmosphereDefinition::~AtmosphereDefinition() {
|
||||
|
|
|
@ -50,15 +50,15 @@ OpenGLVegetation::OpenGLVegetation(OpenGLRenderer *renderer) : OpenGLPart(render
|
|||
}
|
||||
|
||||
OpenGLVegetation::~OpenGLVegetation() {
|
||||
for (auto layer : layers) {
|
||||
delete layer;
|
||||
}
|
||||
layers.clear();
|
||||
updater->interrupt();
|
||||
delete updater;
|
||||
|
||||
delete layers_lock;
|
||||
|
||||
updater->interrupt();
|
||||
delete updater;
|
||||
for (auto &layer: layers) {
|
||||
delete layer;
|
||||
}
|
||||
layers.clear();
|
||||
}
|
||||
|
||||
void OpenGLVegetation::initialize() {
|
||||
|
|
Loading…
Reference in a new issue