From 8cbc1517c1ba508dbf4d19f6eee729cdd1df8c37 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 24 May 2010 16:19:21 -0600 Subject: [PATCH] st/glx: check if deleting head of buffer list --- src/gallium/state_trackers/glx/xlib/xm_api.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c index fc12a9a71f6..c0c418306fb 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_api.c +++ b/src/gallium/state_trackers/glx/xlib/xm_api.c @@ -1184,6 +1184,10 @@ void xmesa_destroy_buffers_on_display(Display *dpy) next = b->Next; if (b->xm_visual->display == dpy) { xmesa_free_buffer(b); + /* delete head of list? */ + if (XMesaBufferList == b) { + XMesaBufferList = next; + } } } } -- 2.30.2