diff options
author | Karl Schultz <[email protected]> | 2003-01-15 00:34:16 +0000 |
---|---|---|
committer | Karl Schultz <[email protected]> | 2003-01-15 00:34:16 +0000 |
commit | ec4c882e4766d80bcc8a462af90c71bc3be98791 (patch) | |
tree | 23ad4f9704a0bbc14484cd1ea650dbb1182207c6 /src/mesa/drivers/windows | |
parent | 4fc647c3976e3bc7d0352d49e983f9dc08689a00 (diff) |
Fix SourceForge bug 664908. wglDescribePixelFormat should return the
number of valid PFD's if the PFD pointer is NULL, without checking
the validity of the other parameters.
Diffstat (limited to 'src/mesa/drivers/windows')
-rw-r--r-- | src/mesa/drivers/windows/wgl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/windows/wgl.c b/src/mesa/drivers/windows/wgl.c index b69e5f07d53..9aad2f28241 100644 --- a/src/mesa/drivers/windows/wgl.c +++ b/src/mesa/drivers/windows/wgl.c @@ -1,4 +1,4 @@ -/* $Id: wgl.c,v 1.11 2002/09/04 14:14:36 brianp Exp $ */ +/* $Id: wgl.c,v 1.12 2003/01/15 00:34:16 kschultz Exp $ */ /* * This library is free software; you can redistribute it and/or @@ -558,6 +558,8 @@ WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC hdc,int iPixelFormat,UINT nByte int qt_valid_pix; qt_valid_pix = qt_pix; + if(ppfd == NULL) + return(qt_valid_pix); if(iPixelFormat < 1 || iPixelFormat > qt_valid_pix || nBytes != sizeof(PIXELFORMATDESCRIPTOR)) { SetLastError(0); |