Catch a missing font provider earlier (#3222)

Rather than hitting an assert in platform-independent code, we now trigger an
assert closer to the relevant code when the font provider is missing.
This commit is contained in:
Adam Barth 2016-11-15 20:17:45 -08:00 committed by GitHub
parent 5118d0472f
commit cfe69e4e85

View File

@ -119,6 +119,11 @@ sk_sp<SkTypeface> FontCache::createTypeface(
[&response](fonts::FontResponsePtr r) { response = std::move(r); });
font_provider.WaitForIncomingResponse();
FTL_DCHECK(response)
<< "Unable to contact the font provider. Did you run "
"Flutter in an environment that has a font manager?\n"
"See <https://fuchsia.googlesource.com/modular/+/master/README.md>.";
if (!response)
return nullptr;