Skip to content

Commit

Permalink
Do not double delete the test font data stream (flutter#3365)
Browse files Browse the repository at this point in the history
SkTypeface::MakeFromStream takes ownership of the passed SkStreamAsset*

Fixes flutter/flutter#7657
  • Loading branch information
jason-simmons authored Jan 26, 2017
1 parent fb69728 commit fe9fb68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/test_font_selector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fe9fb68

Please sign in to comment.