-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check if global class file still exists before registering it
(cherry picked from commit e264ae2)
- Loading branch information
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ | |
#include "script_language.h" | ||
|
||
#include "core/core_string_names.h" | ||
#include "core/os/file_access.h" | ||
#include "core/project_settings.h" | ||
|
||
ScriptLanguage *ScriptServer::_languages[MAX_LANGUAGES]; | ||
|
@@ -166,7 +167,7 @@ void ScriptServer::init_languages() { | |
|
||
for (int i = 0; i < script_classes.size(); i++) { | ||
Dictionary c = script_classes[i]; | ||
if (!c.has("class") || !c.has("language") || !c.has("path") || !c.has("base")) | ||
if (!c.has("class") || !c.has("language") || !c.has("path") || !FileAccess::exists(c["path"]) || !c.has("base")) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
reduz
Member
|
||
continue; | ||
add_global_class(c["class"], c["base"], c["language"], c["path"]); | ||
} | ||
|
This seems to be the cause of #40991. Probably due to path being remapped from
*.gd
to*.gdc
(or*.gde
in case of encryption).