Index: include/core/SkTDArray.h |
diff --git a/include/core/SkTDArray.h b/include/core/SkTDArray.h |
index 26c6c7f8956b6cb1cdd80eaad35af7ee774f47bd..381eb1ae0e67e3cfb099009556724c1eda3cd29d 100644 |
--- a/include/core/SkTDArray.h |
+++ b/include/core/SkTDArray.h |
@@ -44,7 +44,7 @@ public: |
if (src.fCount > fReserve) { |
SkTDArray<T> tmp(src.fArray, src.fCount); |
this->swap(tmp); |
- } else { |
+ } else if (src.fArray) { |
tomhudson
2015/12/08 16:31:40
Do we not need to invalidate the current contents
|
memcpy(fArray, src.fArray, sizeof(T) * src.fCount); |
fCount = src.fCount; |
} |