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() {
|
||||
for (auto layer : layers) {
|
||||
delete layer;
|
||||
}
|
||||
layers.clear();
|
||||
updater->interrupt();
|
||||
delete updater;
|
||||
|
||||
delete layers_lock;
|
||||
|
||||
updater->interrupt();
|
||||
delete updater;
|
||||
layers.clear();
|
||||
}
|
||||
|
||||
void OpenGLVegetation::initialize() {
|
||||
|
|
Loading…
Reference in a new issue