From cb024b00d90c0fd6078d8116615385fb9efd15aa Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Thu, 24 Mar 2022 17:47:20 +0100 Subject: [PATCH] Fill: don't crash before debug output in case of unfilled locations (#342) --- Fill.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Fill.py b/Fill.py index bd91a8c6..f35e22a2 100644 --- a/Fill.py +++ b/Fill.py @@ -224,7 +224,7 @@ def distribute_items_restrictive(world: MultiWorld): if unplaced or unfilled: logging.warning( f'Unplaced items({len(unplaced)}): {unplaced} - Unfilled Locations({len(unfilled)}): {unfilled}') - items_counter = Counter([location.item.player for location in world.get_locations()]) + items_counter = Counter([location.item.player for location in world.get_locations() if location.item]) locations_counter = Counter([location.player for location in world.get_locations()]) items_counter.update([item.player for item in unplaced]) locations_counter.update([location.player for location in unfilled])