[platforms/drm] Fix typo in cleanup of eglSurface

When switching modes the wrong surface was destroyed resulting in a
crash.
This commit is contained in:
Martin Flöser 2017-10-31 17:05:26 +01:00
parent 33a4cf4050
commit 7739dea33c

View file

@ -168,7 +168,7 @@ bool EglGbmBackend::resetOutput(Output &o, DrmOutput *drmOutput)
} else {
// destroy previous surface
if (o.eglSurface != EGL_NO_SURFACE) {
eglDestroySurface(eglDisplay(), eglSurface);
eglDestroySurface(eglDisplay(), o.eglSurface);
}
o.eglSurface = eglSurface;
o.gbmSurface = gbmSurface;