Thanks to EGL_MESA_configless_context, the visual pointer can be NULL.
Fixes a segfault (or assertion failure) in piglit's
egl-configless-context test.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
return false;
}
- assert(glVisual);
assert(driContextPriv);
assert(screen);
radeon->texture_depth = driQueryOptioni (&radeon->optionCache,
"texture_depth");
if (radeon->texture_depth == DRI_CONF_TEXTURE_DEPTH_FB)
- radeon->texture_depth = ( glVisual->rgbBits > 16 ) ?
+ radeon->texture_depth = (glVisual == NULL || glVisual->rgbBits > 16) ?
DRI_CONF_TEXTURE_DEPTH_32 : DRI_CONF_TEXTURE_DEPTH_16;
radeon->texture_row_align = 32;
return false;
}
- assert(glVisual);
assert(driContextPriv);
assert(screen);