Fix a crash in get_static_property_type_indexed

Fixes #13243
This commit is contained in:
Bojidar Marinov 2017-11-24 15:26:32 +02:00
parent 0300522189
commit 0b63e84566
No known key found for this signature in database
GPG key ID: 4D546A8F1E091856

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 { 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; bool valid = false;
Variant::Type t = get_static_property_type(p_path[0], &valid); Variant::Type t = get_static_property_type(p_path[0], &valid);
if (!valid) { if (!valid) {