From fbd9d389f0cbeb027e837cfb65f5b98ea442f1de Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Sun, 31 Mar 2024 17:34:13 +0800 Subject: [PATCH] Don't error multiple times when trying to load missing default bus layout --- editor/editor_audio_buses.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 20bf33b25e7..181dc49f7b7 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -1210,7 +1210,10 @@ void EditorAudioBuses::_load_layout() { void EditorAudioBuses::_load_default_layout() { String layout_path = ProjectSettings::get_singleton()->get("audio/default_bus_layout"); - Ref state = ResourceLoader::load(layout_path, "", true); + Ref state; + if (ResourceLoader::exists(layout_path)) { + state = ResourceLoader::load(layout_path, "", true); + } if (state.is_null()) { EditorNode::get_singleton()->show_warning(vformat(TTR("There is no '%s' file."), layout_path)); return;