diff --git a/lib/ui/painting/image_decoder_impeller.cc b/lib/ui/painting/image_decoder_impeller.cc index 01ee5ce62616a..4d70397958b8f 100644 --- a/lib/ui/painting/image_decoder_impeller.cc +++ b/lib/ui/painting/image_decoder_impeller.cc @@ -406,7 +406,10 @@ void ImageDecoderImpeller::Decode(fml::RefPtr descriptor, result, supports_wide_gamut = supports_wide_gamut_ // ]() { - FML_CHECK(context) << "No valid impeller context"; + if (!context) { + result(nullptr); + return; + } auto max_size_supported = context->GetResourceAllocator()->GetMaxTextureSizeSupported();