OSDN Git Service

Fix SourceForge bug 664908. wglDescribePixelFormat should return the
authorKarl Schultz <kschultz@freedesktop.org>
Wed, 15 Jan 2003 00:34:16 +0000 (00:34 +0000)
committerKarl Schultz <kschultz@freedesktop.org>
Wed, 15 Jan 2003 00:34:16 +0000 (00:34 +0000)
number of valid PFD's if the PFD pointer is NULL, without checking
the validity of the other parameters.

src/mesa/drivers/windows/wgl.c

index b69e5f0..9aad2f2 100644 (file)
@@ -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);