Index: src/pdf/SkPDFFont.cpp |
diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp |
index 59bfc8f3f13baf4a03c6e69aabef3522598b11b3..ac9843370f6a0bd8c8dfcf0e483ad8c181a8fdd1 100644 |
--- a/src/pdf/SkPDFFont.cpp |
+++ b/src/pdf/SkPDFFont.cpp |
@@ -267,7 +267,7 @@ static SkData* handle_type1_stream(SkStream* srcStream, size_t* headerLen, |
uint8_t* const resultTrailer = &(buffer[SkToInt(*headerLen + outputOffset)]); |
memcpy(resultTrailer, src + *headerLen + hexDataLen, *trailerLen); |
- return SkData::NewFromMalloc(buffer.detach(), length); |
+ return SkData::NewFromMalloc(buffer.release(), length); |
} |
return nullptr; |
} |
@@ -1077,7 +1077,7 @@ bool SkPDFCIDFont::addFontDescriptor(int16_t defaultWidth, |
SkASSERT(fontData); |
fontSize = fontData->getLength(); |
SkASSERT(fontSize > 0); |
- fontStream.reset(new SkPDFSharedStream(fontData.detach())); |
+ fontStream.reset(new SkPDFSharedStream(fontData.release())); |
fontStream->dict()->insertInt("Length1", fontSize); |
descriptor->insertObjRef("FontFile2", std::move(fontStream)); |
break; |