diff options
Diffstat (limited to 'src/core/SkMatrix.cpp')
-rw-r--r-- | src/core/SkMatrix.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp index e85c6ece4e..f2d1708114 100644 --- a/src/core/SkMatrix.cpp +++ b/src/core/SkMatrix.cpp @@ -1595,8 +1595,10 @@ uint32_t SkMatrix::flatten(void* buffer) const { } uint32_t SkMatrix::unflatten(const void* buffer) { - memcpy(fMat, buffer, 9 * sizeof(SkScalar)); - this->setTypeMask(kUnknown_Mask); + if (buffer) { + memcpy(fMat, buffer, 9 * sizeof(SkScalar)); + this->setTypeMask(kUnknown_Mask); + } return 9 * sizeof(SkScalar); } |