From eb3e1d8888ea37c7500ab964e8523a52a401bade Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 5 Dec 2011 20:40:48 -0700 Subject: [PATCH] mesa: simplify _mesa_remove_renderbuffer() --- src/mesa/main/renderbuffer.c | 12 ++---------- 1 file 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); } -- 2.30.2