aboutsummaryrefslogtreecommitdiff
path: root/src/mesh_generator_thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesh_generator_thread.cpp')
-rw-r--r--src/mesh_generator_thread.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesh_generator_thread.cpp b/src/mesh_generator_thread.cpp
index 126bf6327..98173c788 100644
--- a/src/mesh_generator_thread.cpp
+++ b/src/mesh_generator_thread.cpp
@@ -83,6 +83,11 @@ MeshUpdateQueue::~MeshUpdateQueue()
{
MutexAutoLock lock(m_mutex);
+ for (std::map<v3s16, CachedMapBlockData *>::iterator i = m_cache.begin();
+ i != m_cache.end(); ++i) {
+ delete i->second;
+ }
+
for (std::vector<QueuedMeshUpdate*>::iterator i = m_queue.begin();
i != m_queue.end(); ++i) {
QueuedMeshUpdate *q = *i;