Index: src/core/SkMipMap.cpp |
diff --git a/src/core/SkMipMap.cpp b/src/core/SkMipMap.cpp |
index f579aae955b7ee4fb4bd5ac1efc74071c875019e..c851d64a908a959b4b90234aba4ba81377f0566b 100644 |
--- a/src/core/SkMipMap.cpp |
+++ b/src/core/SkMipMap.cpp |
@@ -451,7 +451,7 @@ SkMipMap* SkMipMap::Build(const SkPixmap& src, SkDiscardableFactoryProc fact) { |
height = SkTMax(1, height >> 1); |
rowBytes = SkToU32(SkColorTypeMinRowBytes(ct, width)); |
- levels[i].fPixmap = SkPixmap(SkImageInfo::Make(width, height, ct, at), addr, rowBytes); |
+ new (&levels[i].fPixmap) SkPixmap(SkImageInfo::Make(width, height, ct, at), addr, rowBytes); |
levels[i].fScale = SkSize::Make(SkIntToScalar(width) / src.width(), |
SkIntToScalar(height) / src.height()); |