winemac.drv: Also return the number of pixel formats if the caller didn't supply a PIXELFORMATDESCRIPTOR.

This commit is contained in:
Charles Davis 2013-07-23 21:26:29 -06:00 committed by Alexandre Julliard
parent dcaeb6b4fd
commit 05a68dbc55

View File

@ -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];