From cfe69e4e858ce139bb990e7e146295d7e3492503 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Tue, 15 Nov 2016 20:17:45 -0800 Subject: [PATCH] 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. --- sky/engine/platform/fonts/fuchsia/FontCacheFuchsia.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sky/engine/platform/fonts/fuchsia/FontCacheFuchsia.cpp b/sky/engine/platform/fonts/fuchsia/FontCacheFuchsia.cpp index 46fa2a169..1e14d4fe6 100644 --- a/sky/engine/platform/fonts/fuchsia/FontCacheFuchsia.cpp +++ b/sky/engine/platform/fonts/fuchsia/FontCacheFuchsia.cpp @@ -119,6 +119,11 @@ sk_sp 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 ."; + if (!response) return nullptr; -- GitLab