diff --git a/engine/src/flutter/impeller/entity/inline_pass_context.cc b/engine/src/flutter/impeller/entity/inline_pass_context.cc index b04bf025c7..4253e75987 100644 --- a/engine/src/flutter/impeller/entity/inline_pass_context.cc +++ b/engine/src/flutter/impeller/entity/inline_pass_context.cc @@ -54,10 +54,13 @@ bool InlinePassContext::EndPass() { return true; } - if (!command_buffer_->SubmitCommandsAsync(std::move(pass_))) { - VALIDATION_LOG << "Failed to encode and submit command buffer while ending " - "render pass."; - return false; + if (command_buffer_) { + if (!command_buffer_->SubmitCommandsAsync(std::move(pass_))) { + VALIDATION_LOG + << "Failed to encode and submit command buffer while ending " + "render pass."; + return false; + } } pass_ = nullptr;