Adds a small fix on walking interruption to avoid freed reference

This commit is contained in:
Julian Murgia authored and Duncan Brown committed 2022-08-16 23:56:39 -04:00
1 parent 881ad581bc
commit 7c00f1dd37
1 file changed
+2 -1
@@ -71,5 +71,6 @@ func run(command_params: Array) -> int:
# Function called when the command is interrupted. # Function called when the command is interrupted.
func interrupt(): func interrupt():
if walking_object_node != null and not walking_object_node is ESCPlayer: if walking_object_node != null and is_instance_valid(walking_object_node) \
and not walking_object_node is ESCPlayer:
walking_object_node.stop_walking_now() walking_object_node.stop_walking_now()