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
This commit is contained in:
commit-bot@chromium.org 2013-05-11 13:21:43 +00:00
parent 66a4a4cd9a
commit 3f4ea26ff5

View File

@ -978,6 +978,9 @@ public:
* returned texture.
*/
GrTexture* detach() {
if (NULL == fTexture) {
return NULL;
}
GrTexture* texture = fTexture;
fTexture = NULL;