diff options
author | Robert Phillips <robertphillips@google.com> | 2017-05-01 13:12:20 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-03 16:59:37 +0000 |
commit | a91e0b7cc2537dc57ccf67914638e13b4612ffd1 (patch) | |
tree | 858fb3b4d98cb07461468f9b9ea1935f7950392e /src/gpu/effects/GrBitmapTextGeoProc.cpp | |
parent | 7eb86981a954c500fa4a4d8425496a5beb789e5d (diff) |
Allow TextureSamplers to have null GrTexture pointer
Bug: 715488
Change-Id: I69775cbb50d334d81872e236e59368fe65e698ff
Reviewed-on: https://skia-review.googlesource.com/14605
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/effects/GrBitmapTextGeoProc.cpp')
-rw-r--r-- | src/gpu/effects/GrBitmapTextGeoProc.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp index 527d5ce276..470af46783 100644 --- a/src/gpu/effects/GrBitmapTextGeoProc.cpp +++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp @@ -105,9 +105,10 @@ public: // Currently we hardcode numbers to convert atlas coordinates to normalized floating point SkASSERT(gp.numTextureSamplers() == 1); GrTexture* atlas = gp.textureSampler(0).texture(); - SkASSERT(atlas); - b->add32(atlas->width()); - b->add32(atlas->height()); + if (atlas) { + b->add32(atlas->width()); + b->add32(atlas->height()); + } } private: |