On Wednesday 12 September 2007 04:09:14 pm Roderick Colenbrander wrote:
+ visinfo = pglXGetVisualFromFBConfig(display, cfgs[i]); + /* We have found an offscreen rendering format when there is no visualinfo :) */ + if(visinfo->visualid == visualid) { pglXGetFBConfigAttrib(display, cfgs[i], GLX_FBCONFIG_ID, &fmt_id); fbconfig = cfgs[i]; }
You're using visinfo before making sure it's valid. And I think that comment is a little misleading talking about offscreen formats when checking for the default visual.
+ if(!visinfo) { nOffscreenFormats++; } + XFree(visinfo);
I don't think we can rely on being able to safely XFree a NULL pointer. None of the other code in opengl.c relies in that behavior.
participants (1)
-
Chris Robinson