aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextContext.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-05 21:32:06 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-05 21:32:06 +0000
commitf3a7bc7954fc6af9b97c2ae7e7be340110792884 (patch)
tree82b272883f6bca9bc63bf793410ee923bd01c583 /src/gpu/GrTextContext.cpp
parenta4d18ddb23fa4109d4351f79eadb46464d3a8440 (diff)
Fix bench crash (calling method on NULL object).
Review URL: https://codereview.appspot.com/7305048 git-svn-id: http://skia.googlecode.com/svn/trunk@7603 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrTextContext.cpp')
-rw-r--r--src/gpu/GrTextContext.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp
index 2a26dae2e6..684b7f749f 100644
--- a/src/gpu/GrTextContext.cpp
+++ b/src/gpu/GrTextContext.cpp
@@ -212,11 +212,13 @@ HAS_ATLAS:
if (flush) {
this->flushGlyphs();
fContext->flush();
+ // flushGlyphs() will reset fDrawTarget to NULL.
+ fDrawTarget = fContext->getTextTarget(fPaint);
+ fDrawTarget->drawState()->setVertexLayout(fVertexLayout);
}
fMaxVertices = kDefaultRequestedVerts;
// ignore return, no point in flushing again.
- fDrawTarget->geometryHints(&fMaxVertices,
- NULL);
+ fDrawTarget->geometryHints(&fMaxVertices, NULL);
int maxQuadVertices = 4 * fContext->getQuadIndexBuffer()->maxQuads();
if (fMaxVertices < kMinRequestedVerts) {