Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
Fix potential crash when loading save with different chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
ForLoveOfCats committed Jul 28, 2019
1 parent 7af565e commit 3ccc216
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions World/World.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ public static void Clear()
Branch.Remove(Force:true);
}

DroppedItem[] RemovingItems = new DroppedItem[ItemList.Count];
ItemList.CopyTo(RemovingItems);
foreach(DroppedItem Item in RemovingItems)
{
Item.Remove();
}

Chunks.Clear();
Grid.Clear();

Expand Down

0 comments on commit 3ccc216

Please sign in to comment.