aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/gpu/GrContext.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index e157a8a28a..40921ea4fc 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1792,8 +1792,10 @@ void GrContext::setupDrawBuffer() {
#if BATCH_RECT_TO_RECT
fDrawBuffer->setQuadIndexBuffer(this->getQuadIndexBuffer());
#endif
- fDrawBuffer->setAutoFlushTarget(fGpu);
- fDrawBuffer->setDrawState(fDrawState);
+ if (fDrawBuffer) {
+ fDrawBuffer->setAutoFlushTarget(fGpu);
+ fDrawBuffer->setDrawState(fDrawState);
+ }
}
GrDrawTarget* GrContext::getTextTarget(const GrPaint& paint) {