Skip to content

Commit

Permalink
fix collection modified error (#1119)
Browse files Browse the repository at this point in the history
  • Loading branch information
stilnat authored Mar 18, 2023
1 parent d3a5993 commit b9539d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Assets/Scripts/SS3D/Systems/Inventory/Containers/Container.cs
Original file line number Diff line number Diff line change
Expand Up @@ -498,9 +498,9 @@ public void Dump()
/// </summary>
public void Purge()
{
foreach (StoredItem item in StoredItems)
for(int i =0; i < StoredItems.Count; i++)
{
item.Item.Delete();
StoredItems[i].Item.Delete();
}
StoredItems.Clear();

Expand Down

0 comments on commit b9539d1

Please sign in to comment.