aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/FontHostStreamTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FontHostStreamTest.cpp')
-rw-r--r--tests/FontHostStreamTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/FontHostStreamTest.cpp b/tests/FontHostStreamTest.cpp
index 30e469b410..e15bd5a355 100644
--- a/tests/FontHostStreamTest.cpp
+++ b/tests/FontHostStreamTest.cpp
@@ -15,6 +15,7 @@
#include "SkPaint.h"
#include "SkPoint.h"
#include "SkRect.h"
+#include "SkStream.h"
#include "SkTypeface.h"
///////////////////////////////////////////////////////////////////////////////
@@ -99,7 +100,7 @@ static void test_fontHostStream(skiatest::Reporter* reporter) {
}
int ttcIndex;
- SkStream* fontData = origTypeface->openStream(&ttcIndex);
+ SkAutoTUnref<SkStream> fontData(origTypeface->openStream(&ttcIndex));
SkTypeface* streamTypeface = SkTypeface::CreateFromStream(fontData);
SkSafeUnref(paint.setTypeface(streamTypeface));
drawBG(&streamCanvas);