未验证 提交 82c7ab09 编写于 作者: W wqyfavor 提交者: GitHub

Fix problem that using multi-engines, sometimes OpenGL would crash be cause of...

Fix problem that using multi-engines, sometimes OpenGL would crash be cause of invalid EAGLContext (#17366)
上级 6d33ee1a
......@@ -70,7 +70,11 @@ IOSRenderTargetGL::~IOSRenderTargetGL() {
glDeleteRenderbuffers(1, &colorbuffer_);
FML_DCHECK(glGetError() == GL_NO_ERROR);
[EAGLContext setCurrentContext:context];
if (context == context_.get()) {
[EAGLContext setCurrentContext:nil];
} else {
[EAGLContext setCurrentContext:context];
}
}
// |IOSRenderTarget|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册