diff --git a/experimental/skottie/SkottieParser.cpp b/experimental/skottie/SkottieParser.cpp index a40a9ae8c0..24603bf828 100644 --- a/experimental/skottie/SkottieParser.cpp +++ b/experimental/skottie/SkottieParser.cpp @@ -57,7 +57,7 @@ bool Parse(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; }