[android] remove fml_check from surface_texture_external_texture (flutter/engine#56760)

We may fail to acquire a new image from the external image source. When this happens, don't crash the app.

Fixes https://github.com/flutter/flutter/issues/159324
This commit is contained in:
Jonah Williams 2024-11-25 12:16:10 -08:00 committed by GitHub
parent 5cc52a6055
commit 448ac0100b

View File

@ -52,7 +52,10 @@ void SurfaceTextureExternalTexture::Paint(PaintContext& context,
if (should_process_frame) { if (should_process_frame) {
ProcessFrame(context, bounds); ProcessFrame(context, bounds);
} }
FML_CHECK(state_ == AttachmentState::kAttached); // If process frame failed, this may not be in attached state.
if (state_ != AttachmentState::kAttached) {
return;
}
if (!dl_image_) { if (!dl_image_) {
FML_LOG(WARNING) FML_LOG(WARNING)