Oops, CreateTypeface takes over ownership of the stream, instead of just ref()
This should be changed, for until it is, fix CreateTypefaceFromFile to not call unref() if the typeface got created. git-svn-id: http://skia.googlecode.com/svn/trunk@94 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
1bfd0ca780
commit
ff7f389c8a
@ -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;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user