Fixing crash when changing render distance #21

Open
nowinar wants to merge 1 commits from nowinar/fix-for-changing-render-distance into main
Showing only changes of commit 125f993067 - Show all commits

View File

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