diff --git a/src/render/opengl/OpenGLVegetation.cpp b/src/render/opengl/OpenGLVegetation.cpp index 7d7eca9..569b449 100644 --- a/src/render/opengl/OpenGLVegetation.cpp +++ b/src/render/opengl/OpenGLVegetation.cpp @@ -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() {