Skip to content

Commit

Permalink
Fix switching between local/remote StateMachinePlayer when playing sc…
Browse files Browse the repository at this point in the history
…ene cause null exception
  • Loading branch information
imjp94 committed May 2, 2021
1 parent cb8a8f4 commit 70894fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions addons/imjp94.yafsm/scenes/StateMachineEditor.gd
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ func _process(delta):
set_debug_mode(false)
return
var stack = state_machine_player.get("Members/StackPlayer.gd/stack")
if not stack:
set_process(false)
set_debug_mode(false)
return

if stack.size() == 1:
set_current_state(state_machine_player.get("Members/StackPlayer.gd/current"))
else:
Expand Down

0 comments on commit 70894fe

Please sign in to comment.