forked from firka/flutter
Workaround fix the platform view dismiss crash related to gl (flutter/engine#9377)
This commit is contained in:
@@ -62,6 +62,7 @@ IOSGLRenderTarget::IOSGLRenderTarget(fml::scoped_nsobject<CAEAGLLayer> layer,
|
||||
}
|
||||
|
||||
IOSGLRenderTarget::~IOSGLRenderTarget() {
|
||||
EAGLContext* context = EAGLContext.currentContext;
|
||||
[EAGLContext setCurrentContext:context_];
|
||||
FML_DCHECK(glGetError() == GL_NO_ERROR);
|
||||
|
||||
@@ -70,6 +71,7 @@ IOSGLRenderTarget::~IOSGLRenderTarget() {
|
||||
glDeleteRenderbuffers(1, &colorbuffer_);
|
||||
|
||||
FML_DCHECK(glGetError() == GL_NO_ERROR);
|
||||
[EAGLContext setCurrentContext:context];
|
||||
}
|
||||
|
||||
bool IOSGLRenderTarget::IsValid() const {
|
||||
|
||||
Reference in New Issue
Block a user