diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-07-08 18:23:06 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-07-08 18:23:06 +0200 |
commit | 157973ad5e44c20249b8f68d3b96945585610491 (patch) | |
tree | 3dcae77796afc3fef74c4e721b5a8a24ecfeb2a6 | |
parent | bdcbfd71a87f446b9742d690d92838aad16f2bcb (diff) | |
parent | f3f3365abd7792a34469de0e9a4688500b26bf04 (diff) | |
download | redot-engine-157973ad5e44c20249b8f68d3b96945585610491.tar.gz |
Merge pull request #79173 from RedworkDE/net-commandline-exporting
C#: Fix command line exporting
-rw-r--r-- | editor/editor_file_system.cpp | 1 | ||||
-rw-r--r-- | modules/mono/csharp_script.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index b71c66d776..914e146d13 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -1635,6 +1635,7 @@ void EditorFileSystem::_queue_update_script_class(const String &p_path) { } void EditorFileSystem::update_file(const String &p_file) { + ERR_FAIL_COND(p_file.is_empty()); EditorFileSystemDirectory *fs = nullptr; int cpos = -1; diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 3e032f213b..1ed495943f 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -2272,7 +2272,7 @@ void CSharpScript::reload_registered_script(Ref<CSharpScript> p_script) { // If the EditorFileSystem singleton is available, update the file; // otherwise, the file will be updated when the singleton becomes available. EditorFileSystem *efs = EditorFileSystem::get_singleton(); - if (efs) { + if (efs && !p_script->get_path().is_empty()) { efs->update_file(p_script->get_path()); } #endif |