Skip to content

Commit

Permalink
Avoid null get_tree() call (dialogic-godot#2052)
Browse files Browse the repository at this point in the history
get_tree() can return null when the Dialogic view isn't open but this function is being called by an external system. No node tree exists to wait for or manipulate, so errors are spammed.
  • Loading branch information
Invertex authored Jan 26, 2024
1 parent b13ff3e commit c33a560
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions addons/dialogic/Editor/Common/update_install_window.gd
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ func _on_update_manager_downdload_completed(result:int):


func _on_resources_reimported(resources:Array) -> void:
await get_tree().process_frame
get_parent().move_to_foreground()
if is_inside_tree():
await get_tree().process_frame
get_parent().move_to_foreground()


func markdown_to_bbcode(text:String) -> String:
Expand Down

0 comments on commit c33a560

Please sign in to comment.