Fixed a potential segfault at program exit

This commit is contained in:
Michaël Lemaire 2015-12-15 17:09:36 +01:00
parent d2b4a1ea5e
commit 1a59c44d0c

View file

@ -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() {