mesa: simplify _mesa_remove_renderbuffer()
authorBrian Paul <brianp@vmware.com>
Tue, 6 Dec 2011 03:40:48 +0000 (20:40 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 8 Dec 2011 15:56:31 +0000 (08:56 -0700)
src/mesa/main/renderbuffer.c

index 22df88c2c507580440051d6a7faa9be88fb3c735..d82b19ad5caf1634af563abc33a0dd0683ad26d9 100644 (file)
@@ -156,17 +156,9 @@ void
 _mesa_remove_renderbuffer(struct gl_framebuffer *fb,
                           gl_buffer_index bufferName)
 {
-   struct gl_renderbuffer *rb;
-
    assert(bufferName < BUFFER_COUNT);
-
-   rb = fb->Attachment[bufferName].Renderbuffer;
-   if (!rb)
-      return;
-
-   _mesa_reference_renderbuffer(&rb, NULL);
-
-   fb->Attachment[bufferName].Renderbuffer = NULL;
+   _mesa_reference_renderbuffer(&fb->Attachment[bufferName].Renderbuffer,
+                                NULL);
 }