Index: include/gpu/GrContext.h |
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h |
index 0cdb4fbf25052f53404bd267a853c1681b9d358b..560d440cafbf5aa32336bedb685d95c326dfd6e0 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; |