st/mesa: Fix NULL pointer dereference for incomplete framebuffers
st/mesa: Fix NULL pointer dereference for incomplete framebuffers

This can happen with glamor, which uses EGL_KHR_surfaceless_context and
only explicitly binds GL_READ_FRAMEBUFFER for glReadPixels.

Cc: 59f39c0db42d4479a46b02d4d2bc11120e37bb44@lists.freedesktop.org
Reviewed-by: Brian Paul <3cb4e1df5ec4da2c7c4af7c52cec8cf340a55a10@vmware.com>

metora/MesaGLSLCompiler,zeux/glsl-optimizer,djreep81/glsl-optimizer,tokyovigilante/glsl-optimizer,benaadams/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,dellis1972/glsl-optimizer,dellis1972/glsl-optimizer,tokyovigilante/glsl-optimizer,tokyovigilante/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,djreep81/glsl-optimizer,bkaradzic/glsl-optimizer,wolf96/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,dellis1972/glsl-optimizer,zeux/glsl-optimizer,tokyovigilante/glsl-optimizer,wolf96/glsl-optimizer,mcanthony/glsl-optimizer,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,wolf96/glsl-optimizer,dellis1972/glsl-optimizer,zz85/glsl-optimizer,zz85/glsl-optimizer,wolf96/glsl-optimizer,jbarczak/glsl-optimizer,benaadams/glsl-optimizer,mcanthony/glsl-optimizer,metora/MesaGLSLCompiler,benaadams/glsl-optimizer,zz85/glsl-optimizer,tokyovigilante/glsl-optimizer,djreep81/glsl-optimizer,benaadams/glsl-optimizer,mcanthony/glsl-optimizer,jbarczak/glsl-optimizer,jbarczak/glsl-optimizer,jbarczak/glsl-optimizer,mcanthony/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,djreep81/glsl-optimizer,djreep81/glsl-optimizer,dellis1972/glsl-optimizer,bkaradzic/glsl-optimizer,wolf96/glsl-optimizer,metora/MesaGLSLCompiler,zz85/glsl-optimizer,jbarczak/glsl-optimizer,zeux/glsl-optimizer