From b6bd24d31f56622d3fb06eca2aa9ed0d8c52457b Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Wed, 31 Jul 2013 18:49:33 +0000 Subject: add impls for createfromstream for fontconfig fontmgr git-svn-id: http://skia.googlecode.com/svn/trunk@10469 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkFontHost.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/core') diff --git a/src/core/SkFontHost.cpp b/src/core/SkFontHost.cpp index 11f681329a..799b95b565 100644 --- a/src/core/SkFontHost.cpp +++ b/src/core/SkFontHost.cpp @@ -162,14 +162,23 @@ SkTypeface* SkFontMgr::matchFaceStyle(const SkTypeface* face, } SkTypeface* SkFontMgr::createFromData(SkData* data, int ttcIndex) { + if (NULL == data) { + return NULL; + } return this->onCreateFromData(data, ttcIndex); } SkTypeface* SkFontMgr::createFromStream(SkStream* stream, int ttcIndex) { + if (NULL == stream) { + return NULL; + } return this->onCreateFromStream(stream, ttcIndex); } SkTypeface* SkFontMgr::createFromFile(const char path[], int ttcIndex) { + if (NULL == path) { + return NULL; + } return this->onCreateFromFile(path, ttcIndex); } -- cgit v1.2.3