From fcd9e657d0c86cfa4c5bb951ccad2ff5f242863a Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 30 Sep 2014 20:14:28 +0300 Subject: [PATCH] Don't leak AsyncUpdaters if Mesh async loading is aborted --- source/mesh.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/mesh.cpp b/source/mesh.cpp index 055345fa..3e9e118a 100644 --- a/source/mesh.cpp +++ b/source/mesh.cpp @@ -283,6 +283,8 @@ Mesh::AsyncLoader::AsyncLoader(Mesh &m, IO::Seekable &i): Mesh::AsyncLoader::~AsyncLoader() { mesh.disallow_rendering = false; + delete vertex_updater; + delete index_updater; } bool Mesh::AsyncLoader::needs_sync() const @@ -315,7 +317,9 @@ bool Mesh::AsyncLoader::process() else if(phase==3) { delete vertex_updater; + vertex_updater = 0; delete index_updater; + index_updater = 0; } ++phase; -- 2.45.2