glx/dri: Initialize api even if num_attribs == 0.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 11 Jan 2012 07:32:50 +0000 (23:32 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 11 Jan 2012 20:13:49 +0000 (12:13 -0800)
commit10a6fde333f0170fbac70924581c647e531aba3e
treeb9b6c124a67d3af97f664e72d72a1d496ff54780
parentdce4c368b5536716770e5cabef0321db8537a6d9
glx/dri: Initialize api even if num_attribs == 0.

Both dri2_create_context_attribs and drisw_create_context_attribs call
dri2_convert_glx_attribs, expecting it to fill in *api on success.

However, when num_attribs == 0, it was returning true without setting
*api, causing the caller to use an uninitialized value.

Tested-by: Vadim Girlin <vadimgirlin@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/glx/dri_common.c