Support querying of number of visuals without reporting an error or
crashing.
This commit is contained in:
parent
9d9cf72a70
commit
236893c620
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue