aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-31 18:49:33 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-31 18:49:33 +0000
commitb6bd24d31f56622d3fb06eca2aa9ed0d8c52457b (patch)
treee5e90c5564043c8215f0601f6e496b72aa5cbdd3 /src/core
parentcde269a6a62a423aa7cfb285e35881655d581a85 (diff)
add impls for createfromstream for fontconfig fontmgr
git-svn-id: http://skia.googlecode.com/svn/trunk@10469 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkFontHost.cpp9
1 files changed, 9 insertions, 0 deletions
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);
}