mirror of
https://github.com/minetest/minetest.git
synced 2025-03-14 14:22:36 +01:00
Fix segfault caused by a8e238ed06ee8285ed4459e9deda3117419837f6
This commit is contained in:
@ -1499,8 +1499,8 @@ void Map::timerUpdate(float dtime, float unload_timeout, u32 max_loaded_blocks,
|
||||
}
|
||||
block_count_all = mapblock_queue.size();
|
||||
// Delete old blocks, and blocks over the limit from the memory
|
||||
while (mapblock_queue.size() > max_loaded_blocks
|
||||
|| mapblock_queue.top().block->getUsageTimer() > unload_timeout) {
|
||||
while (!mapblock_queue.empty() && (mapblock_queue.size() > max_loaded_blocks
|
||||
|| mapblock_queue.top().block->getUsageTimer() > unload_timeout)) {
|
||||
TimeOrderedMapBlock b = mapblock_queue.top();
|
||||
mapblock_queue.pop();
|
||||
|
||||
|
Reference in New Issue
Block a user