Only try to free the front buffer when it's a pbuffer.
authorAlan Hourihane <alanh@tungstengraphics.com>
Wed, 5 Jan 2005 21:49:52 +0000 (21:49 +0000)
committerAlan Hourihane <alanh@tungstengraphics.com>
Wed, 5 Jan 2005 21:49:52 +0000 (21:49 +0000)
src/mesa/drivers/dri/unichrome/via_context.c

index 4b675e5c707bb7aaf3a406617854706b86bc2a70..dde78c2dc90dca33b1728cb68290602502fdd79d 100644 (file)
@@ -296,7 +296,7 @@ AllocateDmaBuffer(const GLvisual *visual, viaContextPtr vmesa)
 static void
 FreeBuffer(viaContextPtr vmesa)
 {
-    if (vmesa->front.map)
+    if (vmesa->front.map && vmesa->drawType == GLX_PBUFFER_BIT)
        via_free_draw_buffer(vmesa, &vmesa->front);
 
     if (vmesa->back.map)