[skottie] Harden json string parsing
TBR= Change-Id: I538d1a86c1adc4a00deffc254c8bfde8d5d6794b Reviewed-on: https://skia-review.googlesource.com/121324 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
This commit is contained in:
parent
d4228473a5
commit
21d3f9016f
@ -57,7 +57,7 @@ bool Parse<SkString>(const Json::Value& jv, SkString* v) {
|
||||
if (jv.isNull() || !jv.isConvertibleTo(Json::stringValue))
|
||||
return false;
|
||||
|
||||
v->set(jv.asCString());
|
||||
v->set(jv.isString() ? jv.asCString() : jv.asString().c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user