Fixed a potential segfault at program exit
This commit is contained in:
parent
d2b4a1ea5e
commit
1a59c44d0c
1 changed files with 3 additions and 6 deletions
|
@ -50,15 +50,12 @@ OpenGLVegetation::OpenGLVegetation(OpenGLRenderer *renderer) : OpenGLPart(render
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenGLVegetation::~OpenGLVegetation() {
|
OpenGLVegetation::~OpenGLVegetation() {
|
||||||
for (auto layer : layers) {
|
updater->interrupt();
|
||||||
delete layer;
|
delete updater;
|
||||||
}
|
|
||||||
layers.clear();
|
|
||||||
|
|
||||||
delete layers_lock;
|
delete layers_lock;
|
||||||
|
|
||||||
updater->interrupt();
|
layers.clear();
|
||||||
delete updater;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenGLVegetation::initialize() {
|
void OpenGLVegetation::initialize() {
|
||||||
|
|
Loading…
Reference in a new issue