diff options
Diffstat (limited to 'libs/rs/rsContext.cpp')
| -rw-r--r-- | libs/rs/rsContext.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index 7310418..3acb624 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -253,7 +253,11 @@ void Context::deinitEGL() { LOGV("%p, deinitEGL", this); if (mEGL.mContext != EGL_NO_CONTEXT) { - eglMakeCurrent(mEGL.mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, mEGL.mContext); + eglMakeCurrent(mEGL.mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + eglDestroySurface(mEGL.mDisplay, mEGL.mSurfaceDefault); + if (mEGL.mSurface != EGL_NO_SURFACE) { + eglDestroySurface(mEGL.mDisplay, mEGL.mSurface); + } eglDestroyContext(mEGL.mDisplay, mEGL.mContext); checkEglError("eglDestroyContext"); } |
