From 1b6af0762d48602227f581037ca4a45a894d421f Mon Sep 17 00:00:00 2001 From: sushi Date: Thu, 19 Nov 2020 11:28:58 -0500 Subject: [PATCH] Fix rare crash when hiding markers --- src/Util.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Util.gd b/src/Util.gd index 1d92964..89c5114 100644 --- a/src/Util.gd +++ b/src/Util.gd @@ -31,7 +31,8 @@ func add_hidden(node: Node) -> void: if len(nodes_hidden) > 10: var to_delete = nodes_hidden[0] nodes_hidden.erase(to_delete) - to_delete.queue_free() + if is_instance_valid(to_delete): + to_delete.queue_free() Events.emit_signal("entrances_changed", -1) func _on_mode_changed(new_mode: int) -> void: