[skottie] More defensive array indexing

Rapidjson's array [] operator asserts the index is valid (instead of
returning a null value when out-of-range) -> we must check.

Bug: skia:7918
Change-Id: Ice4a6e6670a824da0d423da4a6f92414cd0dc252
Reviewed-on: https://skia-review.googlesource.com/126441
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
1 file changed