aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-04-24 09:57:12 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-24 09:57:12 -0700
commit9b8e79eca281e62c954ae875cf99df77b94b4bbb (patch)
tree5ea2420b6a6b3718ded0850a85b8aa57dd99f725 /src
parent08bc8488fa2ea2d2a17efb1443f0ec6579d5a3c8 (diff)
simple fix for preabandon valgrind error
TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1106663003
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrAtlasTextContext.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp
index ad56e89f8b..56ad9d2d99 100644
--- a/src/gpu/GrAtlasTextContext.cpp
+++ b/src/gpu/GrAtlasTextContext.cpp
@@ -360,6 +360,11 @@ void GrAtlasTextContext::drawTextBlob(GrRenderTarget* rt, const GrClip& clip,
const SkPaint& skPaint, const SkMatrix& viewMatrix,
const SkTextBlob* blob, SkScalar x, SkScalar y,
SkDrawFilter* drawFilter, const SkIRect& clipBounds) {
+ // If we have been abandoned, then don't draw
+ if (!fContext->getTextTarget()) {
+ return;
+ }
+
SkAutoTUnref<BitmapTextBlob> cacheBlob;
SkMaskFilter::BlurRec blurRec;
BitmapTextBlob::Key key;