diff --git a/src/ports/SkFontHost_linux.cpp b/src/ports/SkFontHost_linux.cpp index 561b7df234..a7cda52789 100644 --- a/src/ports/SkFontHost_linux.cpp +++ b/src/ports/SkFontHost_linux.cpp @@ -577,10 +577,10 @@ SkTypeface* SkFontHost::CreateTypefaceFromFile(const char path[]) { SkFILEStream* stream = SkNEW_ARGS(SkFILEStream, (path)); if (stream->isValid()) { - face = CreateTypeface(stream); + return CreateTypeface(stream); } stream->unref(); - return face; + return NULL; } ///////////////////////////////////////////////////////////////////////////////