aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/FontHostStreamTest.cpp
diff options
context:
space:
mode:
authorGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-17 20:19:13 +0000
committerGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-17 20:19:13 +0000
commit148a3961b1c82a891012f2feb2a875cea2593170 (patch)
tree19447e5c86ddf83f248d30075befdf78cc759d54 /tests/FontHostStreamTest.cpp
parent8e679fe0238771c32609a4f33045dd599509d2cf (diff)
Don't die when there are no fonts available.
Diffstat (limited to 'tests/FontHostStreamTest.cpp')
-rw-r--r--tests/FontHostStreamTest.cpp2
1 files changed, 1 insertions, 1 deletions
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);