Index: src/xps/SkXPSDevice.cpp |
diff --git a/src/xps/SkXPSDevice.cpp b/src/xps/SkXPSDevice.cpp |
index db152844a148aae2bcce28cddfa668f4a5899057..566651e5d94b758e61fec9b1f90b080a41bb410d 100644 |
--- a/src/xps/SkXPSDevice.cpp |
+++ b/src/xps/SkXPSDevice.cpp |
@@ -662,7 +662,7 @@ HRESULT SkXPSDevice::createXpsImageBrush( |
HRM(E_FAIL, "Unable to encode bitmap as png."); |
} |
SkMemoryStream* read = new SkMemoryStream; |
- read->setData(write.copyToData())->unref(); |
+ read->setData(write.detachAsData()); |
SkTScopedComPtr<IStream> readWrapper; |
HRM(SkIStream::CreateFromSkStream(read, true, &readWrapper), |
"Could not create stream from png data."); |