Fix a memleak pointed by @Zeno- in MeshUpdateQueue

This leak was introduced when added cache to MeshUpdateQueue and only occurs when leaving world.
This commit is contained in:
Loic Blot 2017-05-16 08:27:18 +02:00
parent 1bf9b25fb4
commit 582ee15d8e
No known key found for this signature in database
GPG Key ID: EFAA458E8C153987

@ -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;