summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-11-24 15:07:24 +0100
committerGitHub <noreply@github.com>2017-11-24 15:07:24 +0100
commit3d0aec7a81131ffb2080f26e4f4544e7a30670eb (patch)
treea30784729158fe567805c00748515e8f71162e81
parent1406fb6ede644afc621f1f8e4ac2f4a7016f4681 (diff)
parent0b63e84566bdced2f92adfe463481112d9695355 (diff)
Merge pull request #13244 from bojidar-bg/13243-get-static-indexed
Fix a crash in get_static_property_type_indexed
-rw-r--r--core/object.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/object.cpp b/core/object.cpp
index 631676d827..cb6ecefa9d 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -1749,6 +1749,13 @@ Variant::Type Object::get_static_property_type(const StringName &p_property, boo
Variant::Type Object::get_static_property_type_indexed(const Vector<StringName> &p_path, bool *r_valid) const {
+ if (p_path.size() == 0) {
+ if (r_valid)
+ *r_valid = false;
+
+ return Variant::NIL;
+ }
+
bool valid = false;
Variant::Type t = get_static_property_type(p_path[0], &valid);
if (!valid) {