[skottie] Null value crash in json::ValueRef::toString()
Bug: skia:7935 Change-Id: Ibe99ccbf5b8dcf889a71acf1fb52063001fd7612 Reviewed-on: https://skia-review.googlesource.com/126923 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
This commit is contained in:
parent
1b6b4c5392
commit
9739d7cf2b
@ -206,8 +206,10 @@ const rapidjson::Value* ValueRef::end() const {
|
||||
SkString json::ValueRef::toString() const {
|
||||
#ifdef SK_DEBUG
|
||||
rapidjson::StringBuffer buf;
|
||||
rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buf);
|
||||
fValue->Accept(writer);
|
||||
if (fValue) {
|
||||
rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buf);
|
||||
fValue->Accept(writer);
|
||||
}
|
||||
|
||||
return SkString(buf.GetString());
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user