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