diff options
author | brianosman <brianosman@google.com> | 2016-06-17 07:03:45 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-17 07:03:45 -0700 |
commit | 7d2f607ac16788eac985d4738b8cb901971f33c3 (patch) | |
tree | 5847f89120148d2c2a5e3e97318021d64dad5108 /src | |
parent | ed330c8755044822ec536ce8eb0a98a8627302bd (diff) |
Don't try to set gamma treatment if texture creation fails.
Guessing this will fix the valgrind failure.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2075133002
Review-Url: https://codereview.chromium.org/2075133002
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/SkGr.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp index befdc83bb0..60fcdd5139 100644 --- a/src/gpu/SkGr.cpp +++ b/src/gpu/SkGr.cpp @@ -394,7 +394,9 @@ GrTexture* GrGenerateMipMapsAndUploadToTexture(GrContext* ctx, const SkBitmap& b SkBudgeted::kYes, texels.get(), mipLevelCount); - texture->texturePriv().setGammaTreatment(gammaTreatment); + if (texture) { + texture->texturePriv().setGammaTreatment(gammaTreatment); + } return texture; } } |