From: Brian Paul Date: Tue, 6 Dec 2011 03:40:48 +0000 (-0700) Subject: mesa: simplify _mesa_remove_renderbuffer() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eb3e1d8888ea37c7500ab964e8523a52a401bade;p=mesa.git mesa: simplify _mesa_remove_renderbuffer() --- 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); }