diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-04-11 11:02:39 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-04-11 11:02:39 +0200 |
commit | 17665ec6f2e903146fee24c0871bccda5b8db6c9 (patch) | |
tree | 7566634c7bf5c33b9c203675f4d119042a35a8e7 /editor/editor_audio_buses.cpp | |
parent | b70450871e2137a1863ac340d81b56b2984f15e7 (diff) | |
parent | 1ff8e8548be05571e3bbbc3a9f17279b9bcc6e80 (diff) | |
download | redot-engine-17665ec6f2e903146fee24c0871bccda5b8db6c9.tar.gz |
Merge pull request #89808 from timothyqiu/ok-i-know
Don't error multiple times when trying to load missing default bus layout
Diffstat (limited to 'editor/editor_audio_buses.cpp')
-rw-r--r-- | editor/editor_audio_buses.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 0b42646387..b4e9faa4fd 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -1228,7 +1228,10 @@ void EditorAudioBuses::_load_layout() { void EditorAudioBuses::_load_default_layout() { String layout_path = GLOBAL_GET("audio/buses/default_bus_layout"); - Ref<AudioBusLayout> state = ResourceLoader::load(layout_path, "", ResourceFormatLoader::CACHE_MODE_IGNORE); + Ref<AudioBusLayout> state; + if (ResourceLoader::exists(layout_path)) { + state = ResourceLoader::load(layout_path, "", ResourceFormatLoader::CACHE_MODE_IGNORE); + } if (state.is_null()) { EditorNode::get_singleton()->show_warning(vformat(TTR("There is no '%s' file."), layout_path)); return; |