From ec4c882e4766d80bcc8a462af90c71bc3be98791 Mon Sep 17 00:00:00 2001 From: Karl Schultz Date: Wed, 15 Jan 2003 00:34:16 +0000 Subject: [PATCH] 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. --- src/mesa/drivers/windows/wgl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.30.2