Index: tests/FontHostStreamTest.cpp |
diff --git a/tests/FontHostStreamTest.cpp b/tests/FontHostStreamTest.cpp |
index 4fd88cc4da9a3ee57d6a07e62da9d665971b5975..30e469b4105b71857214e5dfc59620420b76027f 100644 |
--- a/tests/FontHostStreamTest.cpp |
+++ b/tests/FontHostStreamTest.cpp |
@@ -72,7 +72,9 @@ static void test_fontHostStream(skiatest::Reporter* reporter) { |
paint.setColor(SK_ColorGRAY); |
paint.setTextSize(SkIntToScalar(30)); |
- paint.setTypeface(SkTypeface::CreateFromName("Georgia", SkTypeface::kNormal))->unref(); |
+ SkTypeface* fTypeface = SkTypeface::CreateFromName("Georgia", |
+ SkTypeface::kNormal); |
+ SkSafeUnref(paint.setTypeface(fTypeface)); |
SkIRect origRect = SkIRect::MakeWH(64, 64); |
SkBitmap origBitmap; |