diff --git a/src/utils/SkPolyUtils.cpp b/src/utils/SkPolyUtils.cpp index 52435798e2..6ddf0d7c46 100644 --- a/src/utils/SkPolyUtils.cpp +++ b/src/utils/SkPolyUtils.cpp @@ -1164,7 +1164,9 @@ bool SkOffsetSimplePolygon(const SkPoint* inputPolygonVerts, int inputPolygonSiz if (SkScalarNearlyZero(offset)) { for (int i = 0; i < inputPolygonSize; ++i) { *offsetPolygon->push() = inputPolygonVerts[i]; - *polygonIndices->push() = i; + if (polygonIndices) { + *polygonIndices->push() = i; + } } return true; }