aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports
diff options
context:
space:
mode:
authorGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-21 13:46:13 +0000
committerGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-21 13:46:13 +0000
commite9bbee397ce96aa6642a42823feb1d7c4a8ffd8b (patch)
treefc24643afe37e880ef94c82705664b1b7fefd1f4 /src/ports
parenta4d8fc24736e77fd8c588c4be63e3c15a4154860 (diff)
Fix assignment of non-copyable.
Diffstat (limited to 'src/ports')
-rwxr-xr-xsrc/ports/SkFontHost_win.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp
index cf23e93828..2944622070 100755
--- a/src/ports/SkFontHost_win.cpp
+++ b/src/ports/SkFontHost_win.cpp
@@ -1432,14 +1432,13 @@ SkTypeface* SkFontHost::CreateTypefaceFromStream(SkStream* stream) {
}
// Change the name of the font.
- SkData* rewrittenFontData = SkOTUtils::RenameFont(stream, familyName, familyNameSize-1);
- if (NULL == rewrittenFontData) {
+ SkAutoTUnref<SkData> rewrittenFontData(SkOTUtils::RenameFont(stream, familyName, familyNameSize-1));
+ if (NULL == rewrittenFontData.get()) {
return NULL;
}
- SkAutoUnref aur = SkAutoUnref(rewrittenFontData);
// Register the font with GDI.
- HANDLE fontReference = activate_font(rewrittenFontData);
+ HANDLE fontReference = activate_font(rewrittenFontData.get());
if (NULL == fontReference) {
return NULL;
}