st/glx: check if deleting head of buffer list

This commit is contained in:
Brian Paul
2010-05-24 16:19:21 -06:00
parent a949558430
commit 8cbc1517c1
@@ -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;
}
}
}
}