From 3c3590522f6f51db353383f369e4a70932022206 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Fri, 27 Nov 2020 22:55:24 +0200 Subject: [Complex Text Layouts] Add compatibility for legacy Font resources. --- core/object/class_db.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/object/class_db.cpp b/core/object/class_db.cpp index dc28fa10de..f5171f60ec 100644 --- a/core/object/class_db.cpp +++ b/core/object/class_db.cpp @@ -243,8 +243,11 @@ HashMap ClassDB::resource_base_extensions; HashMap ClassDB::compat_classes; bool ClassDB::_is_parent_class(const StringName &p_class, const StringName &p_inherits) { - StringName inherits = p_class; + if (!classes.has(p_class)) { + return false; + } + StringName inherits = p_class; while (inherits.operator String().length()) { if (inherits == p_inherits) { return true; -- cgit v1.2.3