Исправление. Возможно обращение к несуществующему элементу

This commit is contained in:
sasha80
2026-01-30 10:59:21 +03:00
parent 5e9ef98301
commit 15245b4586
2 changed files with 2 additions and 2 deletions

View File

@@ -746,7 +746,7 @@ func _on_threat_update(th) -> void:
func _on_threat_lost(th) -> void:
var target = get_parent().get_node(str(th.id))
var target = get_parent().get_node_or_null(str(th.id))
if target:
target.queue_free()

View File

@@ -173,4 +173,4 @@
false,
true
]
}
}