Fixing crash when changing render distance #21

Open
nowinar wants to merge 1 commits from nowinar/fix-for-changing-render-distance into main

View File

@ -103,9 +103,11 @@ void Planet::ChunkThreadUpdate()
chunks.find({ pos.x, pos.y, pos.z - 1 }) == chunks.end())
{
delete chunkData.at(pos);
chunkData.erase(pos);
it = chunkData.erase(it);
}
else {
++it;
}
++it;
}
// Check if camera moved to new chunk