aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--experimental/skottie/SkottieJson.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/experimental/skottie/SkottieJson.cpp b/experimental/skottie/SkottieJson.cpp
index 7b2c6ae985..15d86c4ef0 100644
--- a/experimental/skottie/SkottieJson.cpp
+++ b/experimental/skottie/SkottieJson.cpp
@@ -170,7 +170,7 @@ size_t ValueRef::size() const {
}
ValueRef ValueRef::operator[](size_t i) const {
- return this->isArray() ? ValueRef(fValue->operator[](i)) : ValueRef();
+ return i < this->size() ? ValueRef(fValue->operator[](i)) : ValueRef();
}
ValueRef ValueRef::operator[](const char* key) const {