Do not double delete the test font data stream (flutter/engine#3365)
SkTypeface::MakeFromStream takes ownership of the passed SkStreamAsset* Fixes https://github.com/flutter/flutter/issues/7657
This commit is contained in:
@@ -26,7 +26,7 @@ PassRefPtr<FontData> TestFontSelector::getFontData(
|
||||
return test_font_data_;
|
||||
}
|
||||
|
||||
auto typeface = SkTypeface::MakeFromStream(GetTestFontData().get());
|
||||
auto typeface = SkTypeface::MakeFromStream(GetTestFontData().release());
|
||||
|
||||
FontPlatformData platform_data(typeface, "Ahem", 14.0, false, false,
|
||||
FontOrientation::Horizontal, false);
|
||||
|
||||
Reference in New Issue
Block a user