Fix logger _schedule() logic
This commit is contained in:
parent
d62467bd05
commit
fd4d7d2eb0
1 changed files with 4 additions and 2 deletions
|
@ -52,13 +52,15 @@ func _cleanup() -> void:
|
|||
func _schedule() -> void:
|
||||
var instances_remove_enty: Array[CoreLoggerInstance] = []
|
||||
for instance in instances:
|
||||
instances_remove_enty.append(instance)
|
||||
if !is_instance_valid(instance): continue
|
||||
if !is_instance_valid(instance.parent):
|
||||
logger.diag("Removing instance '" + instance.name + "'")
|
||||
instance.queue_free()
|
||||
instances_remove_enty.append(instance)
|
||||
for instance in instances_remove_enty:
|
||||
instances.remove_at(instances.find(instance))
|
||||
var index: int = instances.find(instance)
|
||||
if index == -1: logger.error("Invalid index -1")
|
||||
else: instances.remove_at(index)
|
||||
|
||||
func _pull_config() -> void:
|
||||
config_level = core.config.logger_level
|
||||
|
|
Loading…
Reference in a new issue