| Index: src/gpu/gl/iOS/SkNativeGLContext_iOS.mm
|
| diff --git a/src/gpu/gl/iOS/SkNativeGLContext_iOS.mm b/src/gpu/gl/iOS/SkNativeGLContext_iOS.mm
|
| index 1e11c0deb7be8afd32fdbf83314f6b9b6d4717c0..f04229f16e752f061c707ec069f95240028b610b 100644
|
| --- a/src/gpu/gl/iOS/SkNativeGLContext_iOS.mm
|
| +++ b/src/gpu/gl/iOS/SkNativeGLContext_iOS.mm
|
| @@ -36,10 +36,13 @@ SkNativeGLContext::~SkNativeGLContext() {
|
| }
|
|
|
| void SkNativeGLContext::destroyGLContext() {
|
| - if ([EAGLContext currentContext] == EAGLCTX) {
|
| - [EAGLContext setCurrentContext:nil];
|
| + if (NULL != fEAGLContext) {
|
| + if ([EAGLContext currentContext] == EAGLCTX) {
|
| + [EAGLContext setCurrentContext:nil];
|
| + }
|
| + [EAGLCTX release];
|
| + fEAGLContext = NULL;
|
| }
|
| - [EAGLCTX release];
|
| }
|
|
|
| const GrGLInterface* SkNativeGLContext::createGLContext(GrGLStandard forcedGpuAPI) {
|
|
|