Commit 236893c6 authored by Lionel Ulmer's avatar Lionel Ulmer Committed by Alexandre Julliard

Support querying of number of visuals without reporting an error or

crashing.
parent 9d9cf72a
......@@ -176,6 +176,11 @@ int X11DRV_DescribePixelFormat(X11DRV_PDEVICE *physDev,
int rb,gb,bb,ab;
TRACE("(%p,%d,%d,%p)\n", physDev, iPixelFormat, nBytes, ppfd);
if (ppfd == NULL) {
/* The application is only querying the number of visuals */
return MAX_PIXELFORMATS;
}
if (nBytes < sizeof(PIXELFORMATDESCRIPTOR)) {
ERR("Wrong structure size !\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment