xlib: handle _mesa_initialize_visual()'s return value
authorBrian Paul <brianp@vmware.com>
Wed, 26 Dec 2012 23:26:58 +0000 (16:26 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 1 Jan 2013 01:17:58 +0000 (18:17 -0700)
commit05cd6cfd5f5a128404f09c4de1a7cf12f3f6f08a
treed1ff8affa05fb5642e33f160116a8a5f6eab5349
parent66ea6e8ec3f7ee44e0011b1dd563fef76ead8bc5
xlib: handle _mesa_initialize_visual()'s return value

If the call fails, we should return NULL from XMesaCreateVisual().
This was found when Waffle tried to create a visual with depth/stencil
bits = -1.  That's an illegal value for glXChooseFBConfig() and we should
return NULL in that situation.

Note: This is a candidate for the stable branches.
src/mesa/drivers/x11/xm_api.c