Check 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=
R=reed@google.com, bungeman@google.com

Author: yunchao.he@intel.com

Review URL: https://chromiumcodereview.appspot.com/14907005

git-svn-id: http://skia.googlecode.com/svn/trunk@9034 2bbb7eff-a529-9590-31e7-b0007b416f81
1 file changed