From 0b63e84566bdced2f92adfe463481112d9695355 Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Fri, 24 Nov 2017 15:26:32 +0200 Subject: [PATCH] Fix a crash in get_static_property_type_indexed Fixes #13243 --- core/object.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/object.cpp b/core/object.cpp index 631676d8273..cb6ecefa9d0 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 &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) {