Skip to content

Commit 17665ec

Browse files
committed
Merge pull request godotengine#89808 from timothyqiu/ok-i-know
Don't error multiple times when trying to load missing default bus layout
2 parents b704508 + 1ff8e85 commit 17665ec

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

editor/editor_audio_buses.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,10 @@ void EditorAudioBuses::_load_layout() {
12281228
void EditorAudioBuses::_load_default_layout() {
12291229
String layout_path = GLOBAL_GET("audio/buses/default_bus_layout");
12301230

1231-
Ref<AudioBusLayout> state = ResourceLoader::load(layout_path, "", ResourceFormatLoader::CACHE_MODE_IGNORE);
1231+
Ref<AudioBusLayout> state;
1232+
if (ResourceLoader::exists(layout_path)) {
1233+
state = ResourceLoader::load(layout_path, "", ResourceFormatLoader::CACHE_MODE_IGNORE);
1234+
}
12321235
if (state.is_null()) {
12331236
EditorNode::get_singleton()->show_warning(vformat(TTR("There is no '%s' file."), layout_path));
12341237
return;

0 commit comments

Comments
 (0)