Skip to content

Commit 1ff8e85

Browse files
committed
Don't error multiple times when trying to load missing default bus layout
1 parent fe01776 commit 1ff8e85

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
@@ -1226,7 +1226,10 @@ void EditorAudioBuses::_load_layout() {
12261226
void EditorAudioBuses::_load_default_layout() {
12271227
String layout_path = GLOBAL_GET("audio/buses/default_bus_layout");
12281228

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

0 commit comments

Comments
 (0)