From e812a2a484660c87383e7e7d8897a9bcf85cf9cc Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 16 Apr 2007 09:11:20 -0600 Subject: use b->display instead of b->xm_visual->display to fix some problems detected w/ valgrind --- src/mesa/drivers/x11/xm_buffer.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/x11/xm_buffer.c b/src/mesa/drivers/x11/xm_buffer.c index 10621cb7a15..51d183bb435 100644 --- a/src/mesa/drivers/x11/xm_buffer.c +++ b/src/mesa/drivers/x11/xm_buffer.c @@ -383,18 +383,18 @@ xmesa_delete_framebuffer(struct gl_framebuffer *fb) } if (b->gc) - XMesaFreeGC(b->xm_visual->display, b->gc); + XMesaFreeGC(b->display, b->gc); if (b->cleargc) - XMesaFreeGC(b->xm_visual->display, b->cleargc); + XMesaFreeGC(b->display, b->cleargc); if (b->swapgc) - XMesaFreeGC(b->xm_visual->display, b->swapgc); + XMesaFreeGC(b->display, b->swapgc); - if (b->xm_visual->mesa_visual.doubleBufferMode) { + if (fb->Visual.doubleBufferMode) { /* free back ximage/pixmap/shmregion */ if (b->backxrb->ximage) { #if defined(USE_XSHM) && !defined(XFree86Server) if (b->shm) { - XShmDetach( b->xm_visual->display, &b->shminfo ); + XShmDetach( b->display, &b->shminfo ); XDestroyImage( b->backxrb->ximage ); shmdt( b->shminfo.shmaddr ); } @@ -404,9 +404,9 @@ xmesa_delete_framebuffer(struct gl_framebuffer *fb) b->backxrb->ximage = NULL; } if (b->backxrb->pixmap) { - XMesaFreePixmap( b->xm_visual->display, b->backxrb->pixmap ); + XMesaFreePixmap( b->display, b->backxrb->pixmap ); if (b->xm_visual->hpcr_clear_flag) { - XMesaFreePixmap( b->xm_visual->display, + XMesaFreePixmap( b->display, b->xm_visual->hpcr_clear_pixmap ); XMesaDestroyImage( b->xm_visual->hpcr_clear_ximage ); } -- cgit v1.2.3