mesa: Don't try to clear a NULL renderbuffer
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 7 Jun 2011 19:27:04 +0000 (12:27 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 8 Jun 2011 01:29:52 +0000 (18:29 -0700)
commit7f9c17aaa82f5a8a1d5f077eba4d5889d3c3b298
tree24191f231b6a8d785dbac7ca6577d0a7ec2f162e
parent1d71bbed3bbeb99d954cc137e4923c5db6e063c8
mesa: Don't try to clear a NULL renderbuffer

In an ES2 context (or if GL_ARB_ES2_compatibility) is supported, the
framebuffer can be complete with some attachments be missing.  In this
case the _ColorDrawBuffers pointer will be NULL.

Fixes the crash in piglit test fbo-missing-attachment-clear.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37739
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
NOTE: This is a candidate for the stable branches.
src/mesa/swrast/s_clear.c