[Impeller] Trivial nullptr de-reference fix (flutter/engine#35361)
This commit is contained in:
@@ -365,6 +365,11 @@ bool EntityPass::OnRender(ContentContext& renderer,
|
||||
stencil_depth_floor);
|
||||
|
||||
auto pass = pass_context.GetRenderPass(pass_depth);
|
||||
|
||||
if (!pass) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!element_entity.ShouldRender(pass->GetRenderTargetSize())) {
|
||||
return true; // Nothing to render.
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "impeller/entity/inline_pass_context.h"
|
||||
|
||||
#include "impeller/base/validation.h"
|
||||
#include "impeller/renderer/command_buffer.h"
|
||||
|
||||
namespace impeller {
|
||||
@@ -61,6 +62,7 @@ std::shared_ptr<RenderPass> InlinePassContext::GetRenderPass(
|
||||
if (!IsActive()) {
|
||||
command_buffer_ = context_->CreateCommandBuffer();
|
||||
if (!command_buffer_) {
|
||||
VALIDATION_LOG << "Could not create command buffer.";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -85,6 +87,7 @@ std::shared_ptr<RenderPass> InlinePassContext::GetRenderPass(
|
||||
|
||||
pass_ = command_buffer_->CreateRenderPass(render_target_);
|
||||
if (!pass_) {
|
||||
VALIDATION_LOG << "Could not create render pass.";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user