Fixing crash when changing render distance #21
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user