We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d5c0a11 + 94104ae commit ef34c3dCopy full SHA for ef34c3d
editor/script/script_editor_plugin.cpp
@@ -2821,7 +2821,11 @@ void ScriptEditor::apply_scripts() const {
2821
2822
void ScriptEditor::reload_scripts(bool p_refresh_only) {
2823
// Call deferred to make sure it runs on the main thread.
2824
- callable_mp(this, &ScriptEditor::_reload_scripts).call_deferred(p_refresh_only);
+ if (!Thread::is_main_thread()) {
2825
+ callable_mp(this, &ScriptEditor::_reload_scripts).call_deferred(p_refresh_only);
2826
+ return;
2827
+ }
2828
+ _reload_scripts(p_refresh_only);
2829
}
2830
2831
void ScriptEditor::_reload_scripts(bool p_refresh_only) {
0 commit comments