Index: src/ports/SkImageGeneratorWIC.cpp |
diff --git a/src/ports/SkImageGeneratorWIC.cpp b/src/ports/SkImageGeneratorWIC.cpp |
index f22cb5a7af871a10376304c4d2be13306ee274c5..52d1377f20cc06fb3259456bc4e6de8f9aa11328 100644 |
--- a/src/ports/SkImageGeneratorWIC.cpp |
+++ b/src/ports/SkImageGeneratorWIC.cpp |
@@ -31,7 +31,7 @@ SkImageGenerator* SkImageGeneratorWIC::NewFromEncodedWIC(SkData* data) { |
SkTScopedComPtr<IStream> iStream; |
// Note that iStream will take ownership of the new memory stream because |
// we set |deleteOnRelease| to true. |
- hr = SkIStream::CreateFromSkStream(new SkMemoryStream(data), true, &iStream); |
+ hr = SkIStream::CreateFromSkStream(new SkMemoryStream(sk_ref_sp(data)), true, &iStream); |
if (FAILED(hr)) { |
return nullptr; |
} |