[Impeller] Check for a null command buffer in InlinePassContext::EndPass (flutter/engine#43485)
This could happen if the pass is immediately ended due to clear color optimization. Fixes https://github.com/flutter/flutter/issues/130167
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user