Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 8ded019

Browse files
authored
[Impeller] Don't crash in image decompression if the context is unavailable. (#40890)
[Impeller] Don't crash in image decompression if the context is unavailable.
1 parent bda4d15 commit 8ded019

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/ui/painting/image_decoder_impeller.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,10 @@ void ImageDecoderImpeller::Decode(fml::RefPtr<ImageDescriptor> descriptor,
406406
result,
407407
supports_wide_gamut = supports_wide_gamut_ //
408408
]() {
409-
FML_CHECK(context) << "No valid impeller context";
409+
if (!context) {
410+
result(nullptr);
411+
return;
412+
}
410413
auto max_size_supported =
411414
context->GetResourceAllocator()->GetMaxTextureSizeSupported();
412415

0 commit comments

Comments
 (0)