move CLIENT_ID code in xmesa_delete_framebuffer(), see bug 7205
authorBrian <brian@yutani.localnet.net>
Wed, 14 Mar 2007 18:42:30 +0000 (12:42 -0600)
committerBrian <brian@yutani.localnet.net>
Wed, 14 Mar 2007 18:42:30 +0000 (12:42 -0600)
src/mesa/drivers/x11/xm_buffer.c

index 747971a6c30c343474763dfc2fafd629ed0e17c1..73c46b1fe60f466196972cd5ce0468576fb1bf3a 100644 (file)
@@ -362,16 +362,13 @@ xmesa_delete_framebuffer(struct gl_framebuffer *fb)
 {
    XMesaBuffer b = XMESA_BUFFER(fb);
 
-#ifdef XFree86Server
-   int client = 0;
-   if (b->frontxrb->drawable)
-       client = CLIENT_ID(b->frontxrb->drawable->id);
-#endif
-
    if (b->num_alloced > 0) {
       /* If no other buffer uses this X colormap then free the colors. */
       if (!xmesa_find_buffer(b->display, b->cmap, b)) {
 #ifdef XFree86Server
+         int client = 0;
+         if (b->frontxrb->drawable)
+            client = CLIENT_ID(b->frontxrb->drawable->id);
          (void)FreeColors(b->cmap, client,
                           b->num_alloced, b->alloced_colors, 0);
 #else