diff options
author | bsalomon <bsalomon@google.com> | 2016-06-14 16:13:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-14 16:13:09 -0700 |
commit | 352f3450bc1a557ecd603b08ff54a61ddb933150 (patch) | |
tree | 044f0a4418b025072e18120259d9c7cfdbf9107e /src/gpu | |
parent | da743935fa0aba854a96654a474454b09e5488e8 (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/gpu')
-rw-r--r-- | src/gpu/GrTextureParamsAdjuster.cpp | 5 |
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. |