diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp index f2e907760..cbd8c79d1 100644 --- a/libs/gui/SurfaceTexture.cpp +++ b/libs/gui/SurfaceTexture.cpp @@ -200,7 +200,7 @@ status_t SurfaceTexture::releaseBufferLocked(int buf, EGLDisplay display, status_t err = ConsumerBase::releaseBufferLocked(buf, mEglDisplay, eglFence); - mEglSlots[mCurrentTexture].mEglFence = EGL_NO_SYNC_KHR; + mEglSlots[buf].mEglFence = EGL_NO_SYNC_KHR; return err; }