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

Commit 189f823

Browse files
[Impeller] Check for a null command buffer in InlinePassContext::EndPass (#43485)
This could happen if the pass is immediately ended due to clear color optimization. Fixes flutter/flutter#130167
1 parent 69eb827 commit 189f823

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

impeller/entity/inline_pass_context.cc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,13 @@ bool InlinePassContext::EndPass() {
5454
return true;
5555
}
5656

57-
if (!command_buffer_->SubmitCommandsAsync(std::move(pass_))) {
58-
VALIDATION_LOG << "Failed to encode and submit command buffer while ending "
59-
"render pass.";
60-
return false;
57+
if (command_buffer_) {
58+
if (!command_buffer_->SubmitCommandsAsync(std::move(pass_))) {
59+
VALIDATION_LOG
60+
<< "Failed to encode and submit command buffer while ending "
61+
"render pass.";
62+
return false;
63+
}
6164
}
6265

6366
pass_ = nullptr;

0 commit comments

Comments
 (0)