DescriptionCheck whether font creation is failed to avoid segment fault.
In some rare cases, SkFontHost::CreateTypeface in src/ports/SkFontHost_fontconfig.cpp will return NULL, this will lead to segment fault because the previous code would access to 0x0 by (SkTypeface *)NULL->unref().
BUG=
Committed: http://code.google.com/p/skia/source/detail?r=9034
Patch Set 1 #Patch Set 2 : remove the tab instead of spaces #Patch Set 3 : remove unnessary lines #Patch Set 4 : #Patch Set 5 : #Patch Set 6 : #Patch Set 7 : #Patch Set 8 : #
Total comments: 1
Patch Set 9 : use SkSafeUnref instead of unref directly to avoid segmentation fault #Patch Set 10 : #Patch Set 11 : #Messages
Total messages: 7 (0 generated)
|