aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2018-05-15 12:52:15 -0600
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-15 20:16:13 +0000
commit072c69cad3b50ba3d04ba7a7d6c9dbec50c1cd4f (patch)
tree2b0f13ba98f4570f04063e0b5bc3c06837d7494c
parent8fd15d8c7ef09ab5aad4d7bbf8c3f3564a537722 (diff)
Check atlasPageCount before accessing the proxy array
Bug: skia: Change-Id: Ib4bca46ea105285f4edea05d78ea4d9ea047d0df Reviewed-on: https://skia-review.googlesource.com/128295 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
-rw-r--r--src/gpu/ops/GrAtlasTextOp.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/ops/GrAtlasTextOp.cpp b/src/gpu/ops/GrAtlasTextOp.cpp
index 96c592d5b4..a314a05163 100644
--- a/src/gpu/ops/GrAtlasTextOp.cpp
+++ b/src/gpu/ops/GrAtlasTextOp.cpp
@@ -230,7 +230,7 @@ void GrAtlasTextOp::onPrepareDraws(Target* target) {
unsigned int atlasPageCount;
const sk_sp<GrTextureProxy>* proxies = atlasManager->getProxies(maskFormat, &atlasPageCount);
- if (!proxies[0]) {
+ if (!atlasPageCount || !proxies[0]) {
SkDebugf("Could not allocate backing texture for atlas\n");
return;
}