Browse Source

Merge pull request #90068 from timothyqiu/ok-i-know-3.x

[3.x] Don't error multiple times when trying to load missing default bus layout
lawnjelly 1 year ago
parent
commit
d63c33fa78
1 changed files with 4 additions and 1 deletions
  1. 4 1
      editor/editor_audio_buses.cpp

+ 4 - 1
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<AudioBusLayout> state = ResourceLoader::load(layout_path, "", true);
+	Ref<AudioBusLayout> 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;