summaryrefslogtreecommitdiff
path: root/src/gallium/winsys
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/egl_xlib/egl_xlib.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/gallium/winsys/egl_xlib/egl_xlib.c b/src/gallium/winsys/egl_xlib/egl_xlib.c
index 9914dff964..e1ddcae97b 100644
--- a/src/gallium/winsys/egl_xlib/egl_xlib.c
+++ b/src/gallium/winsys/egl_xlib/egl_xlib.c
@@ -382,10 +382,7 @@ xlib_eglDestroyContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext ctx)
struct xlib_egl_context *context = lookup_context(ctx);
if (context) {
_eglUnlinkContext(&context->Base);
- if (context->Base.IsBound) {
- context->Base.DeletePending = EGL_TRUE;
- }
- else {
+ if (!context->Base.IsBound) {
/* API-dependent clean-up */
switch (context->Base.ClientAPI) {
case EGL_OPENGL_ES_API:
@@ -536,10 +533,7 @@ xlib_eglDestroySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface)
struct xlib_egl_surface *surf = lookup_surface(surface);
if (surf) {
_eglUnlinkSurface(&surf->Base);
- if (surf->Base.IsBound) {
- surf->Base.DeletePending = EGL_TRUE;
- }
- else {
+ if (!surf->Base.IsBound) {
XFreeGC(surf->Dpy, surf->Gc);
st_unreference_framebuffer(surf->Framebuffer);
free(surf);