| Index: src/gpu/GrAuditTrail.cpp
|
| diff --git a/src/gpu/GrAuditTrail.cpp b/src/gpu/GrAuditTrail.cpp
|
| index 21b7a29251ae64d2768a4cc3020aebde0e9b81c8..353d90183cfdeb0ec932cd67ac1b1a1cb654bc06 100644
|
| --- a/src/gpu/GrAuditTrail.cpp
|
| +++ b/src/gpu/GrAuditTrail.cpp
|
| @@ -147,14 +147,13 @@ void GrAuditTrail::JsonifyTArray(SkString* json, const char* name, const T& arra
|
| json->appendf(",");
|
| }
|
| json->appendf("\"%s\": [", name);
|
| + const char* separator = "";
|
| for (int i = 0; i < array.count(); i++) {
|
| // Handle sentinel nullptrs
|
| - if (!array[i]) {
|
| - continue;
|
| - }
|
| - json->append(array[i]->toJson());
|
| - if (i < array.count() - 1) {
|
| - json->append(",");
|
| + if (array[i]) {
|
| + json->appendf("%s", separator);
|
| + json->append(array[i]->toJson());
|
| + separator = ",";
|
| }
|
| }
|
| json->append("]");
|
|
|