summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/renderbuffer.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index 22df88c2c50..d82b19ad5ca 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -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);
}