aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrPipeline.cpp')
-rw-r--r--src/gpu/GrPipeline.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp
index 872a7f544e..c0170eb703 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -23,7 +23,10 @@ GrPipeline* GrPipeline::CreateAt(void* memory, const CreateArgs& args,
const GrPipelineBuilder& builder = *args.fPipelineBuilder;
const GrUserStencilSettings* userStencil = builder.getUserStencil();
GrRenderTarget* rt = args.fRenderTargetContext->accessRenderTarget();
-
+ if (!rt) {
+ return nullptr;
+ }
+
GrPipeline* pipeline = new (memory) GrPipeline;
pipeline->fRenderTarget.reset(rt);
SkASSERT(pipeline->fRenderTarget);