Skip to content

Commit

Permalink
fix: prevent crash (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy-Vidaurri authored Sep 13, 2024
1 parent 0514d8c commit 5c26058
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Randomizer/RandoLogic/LogicPathway.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public override bool Next()
var closure = LinkedNodeSet.Closure(this.Node, caps, null, true);
var available = closure.UnlinkedEdges(u => {
// ensure first hole is up or right
var flag = this.Logic.CompletedTasks.Count != 1 || (u.Static.HoleTarget.Side != ScreenDirection.Down && u.Static.HoleTarget.Side != ScreenDirection.Left);
var flag = this.Logic.CompletedTasks.Count != 1 || (u.Static.HoleTarget?.Side != ScreenDirection.Down && u.Static.HoleTarget?.Side != ScreenDirection.Left);
return !this.TriedEdges.Contains(u.Static) && (u.Static.HoleTarget == null || (!this.ForceWarp && this.Logic.Map.HoleFree(this.Node.Room, u.Static.HoleTarget) && flag));
});
if (available.Count == 0)
Expand Down

0 comments on commit 5c26058

Please sign in to comment.