On Jul 23, 2013, at 10:26 PM, Charles Davis wrote: > This is akin to what glxdrv already does, and apparently what Windows > does. It allows the GLView sample from the OpenGL SuperBible to > correctly enumerate pixel formats with the Mac driver. > --- > dlls/winemac.drv/opengl.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c > index 0922371..fb294d1 100644 > --- a/dlls/winemac.drv/opengl.c > +++ b/dlls/winemac.drv/opengl.c > @@ -3281,7 +3281,7 @@ int macdrv_wglDescribePixelFormat(HDC hdc, int fmt, > UINT size, PIXELFORMATDESCRI > > TRACE("hdc %p fmt %d size %u descr %p\n", hdc, fmt, size, descr); > > - if (fmt <= 0 || fmt > ret) return ret; > + if (fmt <= 0 || fmt > ret || !descr) return ret; > if (size < sizeof(*descr)) return 0; > > pf = &pixel_formats[fmt - 1]; > -- > 1.7.5.4
Looks good to me. Thanks! -Ken