OSDN Git Service

intel: Fix segfault in glXSwapBuffers with no bound context
authorAnuj Phogat <anuj.phogat@gmail.com>
Wed, 11 Jan 2012 23:26:10 +0000 (15:26 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 19 Jan 2012 19:10:30 +0000 (11:10 -0800)
commita12606cb544dfbd42a354779078a611f7808433c
tree4a57c8d49bbb844f56a843aa2efaca52b94c675d
parent33f5c3946d5e66bb932e2a51eb27b427a3bd1644
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 <yi.sun@intel.com>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Yi Sun <yi.sun@intel.com>
(cherry picked from commit dd7220652e65a8a23e7739eeee687f3d6a865b80)
src/mesa/drivers/dri/intel/intel_screen.c