From fcca1c11ee1b2b9739a616d75311d0af3746355e Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Fri, 14 May 2021 16:22:56 +0200 Subject: [PATCH] app/internal/wm: [iOS] don't destroy context when MakeCurrent fails The caller should ensure the proper destruction. Signed-off-by: Elias Naur --- app/internal/wm/gl_ios.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/internal/wm/gl_ios.go b/app/internal/wm/gl_ios.go index 8b1eaddc..aacd588b 100644 --- a/app/internal/wm/gl_ios.go +++ b/app/internal/wm/gl_ios.go @@ -93,8 +93,6 @@ func (c *context) Unlock() {} func (c *context) MakeCurrent() error { if C.gio_makeCurrent(c.ctx) == 0 { - C.CFRelease(c.ctx) - c.ctx = 0 return errors.New("[EAGLContext setCurrentContext] failed") } if !c.init {