From 148a3961b1c82a891012f2feb2a875cea2593170 Mon Sep 17 00:00:00 2001 From: "bungeman@google.com" Date: Thu, 17 Jan 2013 20:19:13 +0000 Subject: Don't die when there are no fonts available. https://codereview.appspot.com/7147044/ git-svn-id: http://skia.googlecode.com/svn/trunk@7265 2bbb7eff-a529-9590-31e7-b0007b416f81 --- tests/FontHostStreamTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/FontHostStreamTest.cpp') diff --git a/tests/FontHostStreamTest.cpp b/tests/FontHostStreamTest.cpp index eb301e3535..bbf1a03ef3 100644 --- a/tests/FontHostStreamTest.cpp +++ b/tests/FontHostStreamTest.cpp @@ -94,7 +94,7 @@ static void test_fontHostStream(skiatest::Reporter* reporter) { const SkFontID typefaceID = SkTypeface::UniqueID(origTypeface); SkStream* fontData = SkFontHost::OpenStream(typefaceID); SkTypeface* streamTypeface = SkTypeface::CreateFromStream(fontData); - paint.setTypeface(streamTypeface)->unref(); + SkSafeUnref(paint.setTypeface(streamTypeface)); drawBG(&streamCanvas); streamCanvas.drawPosText("A", 1, &point, paint); -- cgit v1.2.3