Merge pull request #13244 from bojidar-bg/13243-get-static-indexed

Fix a crash in get_static_property_type_indexed
This commit is contained in:
Rémi Verschelde 2017-11-24 15:07:24 +01:00 committed by GitHub
commit 3d0aec7a81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -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) {