diff options
author | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2017-11-24 15:26:32 +0200 |
---|---|---|
committer | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2017-11-24 15:26:32 +0200 |
commit | 0b63e84566bdced2f92adfe463481112d9695355 (patch) | |
tree | ffc763c23f419f5591cc98a3c5638ede440fd555 | |
parent | 0300522189b090e7c1ae9c8888101ea32c4ce6bd (diff) |
Fix a crash in get_static_property_type_indexed
Fixes #13243
-rw-r--r-- | core/object.cpp | 7 |
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) { |