Merge pull request #40781 from Rubonnek/fix-inconsistent-class-detection

Fixed inconsistent base class detection
This commit is contained in:
Rémi Verschelde 2020-07-28 23:42:30 +02:00 committed by GitHub
commit 227494be59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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"]);