Chromium Code Reviews| Index: tests/FontHostStreamTest.cpp |
| diff --git a/tests/FontHostStreamTest.cpp b/tests/FontHostStreamTest.cpp |
| index 4fd88cc4da9a3ee57d6a07e62da9d665971b5975..b2dc9e7c1c1b9d7b31a29b558648833beba0fc05 100644 |
| --- a/tests/FontHostStreamTest.cpp |
| +++ b/tests/FontHostStreamTest.cpp |
| @@ -72,7 +72,13 @@ static void test_fontHostStream(skiatest::Reporter* reporter) { |
| paint.setColor(SK_ColorGRAY); |
| paint.setTextSize(SkIntToScalar(30)); |
| - paint.setTypeface(SkTypeface::CreateFromName("Georgia", SkTypeface::kNormal))->unref(); |
| + SkTypeface* font = |
|
bungeman-skia
2013/05/03 14:11:41
I think this just needs to be
SkSafeUnref(paint.s
|
| + SkTypeface::CreateFromName("Georgia", SkTypeface::kNormal); |
| + if (NULL == font) { |
| + printf("create font failed.\n"); |
| + return; |
| + } |
| + paint.setTypeface(font)->unref(); |
| SkIRect origRect = SkIRect::MakeWH(64, 64); |
| SkBitmap origBitmap; |