If DrawBuffer isn't set, return immediately
authorAlan Hourihane <alanh@tungstengraphics.com>
Mon, 19 Jun 2006 09:27:04 +0000 (09:27 +0000)
committerAlan Hourihane <alanh@tungstengraphics.com>
Mon, 19 Jun 2006 09:27:04 +0000 (09:27 +0000)
src/mesa/main/framebuffer.c

index 4d6871bb7d063ba80a790e44602362c611292aa4..4c64281a6250dc67b6695e8a0bd45f0ef9bd89c1 100644 (file)
@@ -381,6 +381,9 @@ _mesa_update_draw_buffer_bounds(GLcontext *ctx)
 {
    struct gl_framebuffer *buffer = ctx->DrawBuffer;
 
+   if (!buffer)
+      return;
+
    if (buffer->Name) {
       /* user-created framebuffer size depends on the renderbuffers */
       update_framebuffer_size(buffer);