diff --git a/PFR/PersonalEffectsRedux/Spot.cs b/PFR/PersonalEffectsRedux/Spot.cs index 1c76a62..eda52ef 100644 --- a/PFR/PersonalEffectsRedux/Spot.cs +++ b/PFR/PersonalEffectsRedux/Spot.cs @@ -38,6 +38,11 @@ private static void Roll(object sender, EventArgs e) //despawn old items var l = Game1.getLocationFromName(ss.Location); + if (l == null) + { + Modworks.Log.Warn($"Location {ss.Location} did not resolve to any known GameLocation"); + continue; + } var pos = new Vector2(ss.X, ss.Y); if (l.objects.ContainsKey(pos)) { @@ -192,4 +197,4 @@ private Spot(string npc, string loc, string locType, int x, int y, int chance, s ForSVE = forSVE; } } -} \ No newline at end of file +}