aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-06-14 16:13:09 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-14 16:13:09 -0700
commit352f3450bc1a557ecd603b08ff54a61ddb933150 (patch)
tree044f0a4418b025072e18120259d9c7cfdbf9107e /src
parentda743935fa0aba854a96654a474454b09e5488e8 (diff)
Check for abandoned texture in GrTextureAdjuster::refTextureSafeForParams
BUG=chromium:618858 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2063313002 TBR=egdaniel@google.com Review-Url: https://codereview.chromium.org/2063313002
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrTextureParamsAdjuster.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/GrTextureParamsAdjuster.cpp b/src/gpu/GrTextureParamsAdjuster.cpp
index a68c3d7657..1657fb9b95 100644
--- a/src/gpu/GrTextureParamsAdjuster.cpp
+++ b/src/gpu/GrTextureParamsAdjuster.cpp
@@ -165,6 +165,11 @@ GrTexture* GrTextureAdjuster::refTextureSafeForParams(const GrTextureParams& par
CopyParams copyParams;
const SkIRect* contentArea = this->contentAreaOrNull();
+ if (!context) {
+ // The texture was abandoned.
+ return nullptr;
+ }
+
if (contentArea && GrTextureParams::kMipMap_FilterMode == params.filterMode()) {
// If we generate a MIP chain for texture it will read pixel values from outside the content
// area.