Index: src/gpu/GrTextContext.cpp |
diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp |
index cef99c6c45de33479ddccfec1f2e30ae7eb8a218..ad5e7c0aa5e1e21347641625d5fb982895adbbe9 100644 |
--- a/src/gpu/GrTextContext.cpp |
+++ b/src/gpu/GrTextContext.cpp |
@@ -40,6 +40,9 @@ bool GrTextContext::drawText(GrRenderTarget* rt, const GrClip& clip, const GrPai |
const SkPaint& skPaint, const SkMatrix& viewMatrix, |
const char text[], size_t byteLength, |
SkScalar x, SkScalar y) { |
+ if (!fContext->getTextTarget()) { |
+ return false; |
+ } |
GrTextContext* textContext = this; |
do { |
@@ -58,6 +61,9 @@ bool GrTextContext::drawPosText(GrRenderTarget* rt, const GrClip& clip, const Gr |
const char text[], size_t byteLength, |
const SkScalar pos[], int scalarsPerPosition, |
const SkPoint& offset) { |
+ if (!fContext->getTextTarget()) { |
+ return false; |
+ } |
GrTextContext* textContext = this; |
do { |