1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 08:35:20 +02:00

Fixed minimap memory leak

This commit is contained in:
Břetislav Štec
2015-07-19 01:35:47 +02:00
committed by kwolekr
parent 9bc0241e44
commit 88a6b9f52d
4 changed files with 16 additions and 8 deletions

View File

@@ -540,20 +540,19 @@ void Client::step(float dtime)
}
if (r.mesh) {
minimap_mapblock = r.mesh->getMinimapMapblock();
do_mapper_update = (minimap_mapblock != NULL);
minimap_mapblock = r.mesh->moveMinimapMapblock();
if (minimap_mapblock == NULL)
do_mapper_update = false;
}
if (r.mesh && r.mesh->getMesh()->getMeshBufferCount() == 0) {
delete r.mesh;
block->mesh = NULL;
} else {
// Replace with the new mesh
block->mesh = r.mesh;
}
} else {
delete r.mesh;
minimap_mapblock = NULL;
}
if (do_mapper_update)