XQuartz: GL: Add a branch to prevent a NULL DrawablePtr structure access.
In attach() check for pDraw being NULL, and also print an ErrorF message, because we eventually want to track down why this is occuring. It's unclear how this occurs, but as I noted in the 1.4 branch, I believe that the DrawablePtr/struct _Drawable -> id is the member being accessed that causes KERN_PROTECTION_FAILURE at 0x0000000000000004 This passes my tests using: env LIBGL_ALWAYS_INDIRECT=1 ./sometest. I fixed a warning: caused by initializing the screen->base.visuals with the configs. It is a ** not a *. It seems that some other part of GLX will initialize this for us.
Showing with 35 additions and 22 deletions