From c8a49a61897152bbdbc8e3f48c09f652d93be7b0 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 12 Dec 2014 14:27:19 +0100 Subject: LightingThread: Fixed a memory leak. --- src/LightingThread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LightingThread.cpp b/src/LightingThread.cpp index 01ba24105..ced95d4e1 100644 --- a/src/LightingThread.cpp +++ b/src/LightingThread.cpp @@ -226,6 +226,8 @@ void cLightingThread::Execute(void) } // CSLock(m_CS) LightChunk(*Item); + Item->Disable(); + delete Item; } } @@ -324,8 +326,6 @@ void cLightingThread::LightChunk(cLightingChunkStay & a_Item) { a_Item.m_CallbackAfter->Call(a_Item.m_ChunkX, a_Item.m_ChunkZ); } - a_Item.Disable(); - delete &a_Item; } -- cgit v1.2.3