intel: Fix segfault in glXSwapBuffers with no bound context
intel: Fix segfault in glXSwapBuffers with no bound context

Calling glXSwapBuffers with no bound context causes segmentation
fault in function intelDRI2Flush. All the gl calls should be
ignored after setting the current context to null. So the contents
of framebuffer stay unchanged. But the driver should not seg fault.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44614

Reported-by: Yi Sun <a7ab858552be010621b3b5c596bf4feb1309fb3c@intel.com>
Signed-off-by: Anuj Phogat <e2026475996c48f0b97fd37e84129b3912980428@gmail.com>
Reviewed-by: Kenneth Graunke <bd2562f754ec92342f93f61c25d731e290a2ffa8@whitecape.org>
Tested-by: Yi Sun <a7ab858552be010621b3b5c596bf4feb1309fb3c@intel.com>

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