From 72d0185f8f686409950d652c00e6262079eeedcc Mon Sep 17 00:00:00 2001 From: kit Date: Sun, 30 Jun 2024 12:49:20 -0500 Subject: [PATCH] Add another guard for invalid keys --- RemnantSaveGuardian/RemnantWorldEvent.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RemnantSaveGuardian/RemnantWorldEvent.cs b/RemnantSaveGuardian/RemnantWorldEvent.cs index e4e09cd..bd44ef1 100644 --- a/RemnantSaveGuardian/RemnantWorldEvent.cs +++ b/RemnantSaveGuardian/RemnantWorldEvent.cs @@ -1274,6 +1274,11 @@ static public void ProcessEvents(RemnantCharacter character, List areas, else continue; } + if (!zoneEvents.ContainsKey(world)) + { + Logger.Warn($"Injectable world {world} not found in {mode} events"); + continue; + } if (zoneEvents[world].Any(we => we._name == injectable._name)) { // injectable already exists