summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-07-28 23:42:30 +0200
committerGitHub <noreply@github.com>2020-07-28 23:42:30 +0200
commit227494be59eca4f50604a9c90c3c36ed15e7ecc5 (patch)
tree35c05113ddbb3972705cd524ee9cd41fcdcd8bcb
parent7a31baf3b9dc066fb15af8aa4f90193df3615226 (diff)
parente264ae20d2a828201a50868b3af334a3f8c8a37c (diff)
Merge pull request #40781 from Rubonnek/fix-inconsistent-class-detection
Fixed inconsistent base class detection
-rw-r--r--core/script_language.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/script_language.cpp b/core/script_language.cpp
index b63aeb952c..5176882662 100644
--- a/core/script_language.cpp
+++ b/core/script_language.cpp
@@ -33,6 +33,7 @@
#include "core/core_string_names.h"
#include "core/debugger/engine_debugger.h"
#include "core/debugger/script_debugger.h"
+#include "core/os/file_access.h"
#include "core/project_settings.h"
#include <stdint.h>
@@ -162,7 +163,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")) {
continue;
}
add_global_class(c["class"], c["base"], c["language"], c["path"]);