SkFontMgr::matchFamily should not crash on nullptr.
authorbungeman <bungeman@google.com>
Mon, 1 May 2017 17:02:42 +0000 (13:02 -0400)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Mon, 1 May 2017 18:13:02 +0000 (18:13 +0000)
commit7575bb1c389f96db4123783fcd717f3611b3a8eb
treeba76ce96b732117155b6fc48c644e9e29f50cd85
parentfe560a8cc3839b7c4c0a63bdb286fe1e1f89a5dc
SkFontMgr::matchFamily should not crash on nullptr.

While all systems can resolve a font from just a style request
(without a name) almost no systems specify a default font family.

BUG=skia:6574

Change-Id: If7c81808b62cd5d8212bce2eb4d9c476c45af80a
Reviewed-on: https://skia-review.googlesource.com/14902
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
include/ports/SkFontMgr.h
src/ports/SkFontHost_mac.cpp
src/ports/SkFontMgr_fontconfig.cpp
src/ports/SkFontMgr_win_dw.cpp
tests/FontMgrTest.cpp