diff options
author | 2013-05-11 13:21:43 +0000 | |
---|---|---|
committer | 2013-05-11 13:21:43 +0000 | |
commit | 3f4ea26ff5794547c4c7ff40b265700fff551521 (patch) | |
tree | 7c45cf70e2ed6d7f4ec226ddf1f8dd4a9ec4d21c /include/gpu/GrContext.h | |
parent | 66a4a4cd9a1a67579028c5829ff46da99ac5d643 (diff) |
Check for NULL texture in GrAutoScratchTexture::detach()
R=sugoi@chromium.org, robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://chromiumcodereview.appspot.com/14683009
git-svn-id: http://skia.googlecode.com/svn/trunk@9104 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu/GrContext.h')
-rw-r--r-- | include/gpu/GrContext.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index 0cdb4fbf25..560d440caf 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h @@ -978,6 +978,9 @@ public: * returned texture. */ GrTexture* detach() { + if (NULL == fTexture) { + return NULL; + } GrTexture* texture = fTexture; fTexture = NULL; |