Skip to content

Commit

Permalink
Fix HyperspaceController crash on null
Browse files Browse the repository at this point in the history
  • Loading branch information
jspahrsummers committed Jul 2, 2024
1 parent 1dd6be2 commit 9326c3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main/hyperspace_controller.gd
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ func _ready() -> void:

func set_jump_destination(destination: StarSystem) -> void:
assert(current_system != destination, "Current system should not be the same as the jump destination")
assert(destination.name in current_system.connections, "Jump destination should be connected to the current system")
assert(destination == null or destination.name in current_system.connections, "Jump destination should be connected to the current system")

if destination == jump_destination:
return

Expand Down

0 comments on commit 9326c3a

Please sign in to comment.