mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-05 22:48:06 +02:00
Check if visualList == NULL, not nVisualsMatched == 0. NULL happens in more
cases (allocation failure) than nVisualsMatched == 0. Noticed from inspection of Coverity #599, #600.
This commit is contained in:
parent
8b42635f57
commit
5262a1945c
1 changed files with 1 additions and 1 deletions
|
|
@ -146,7 +146,7 @@ CmapRecForColormap(
|
|||
visualTemplate.screen = i;
|
||||
visualList = XGetVisualInfo(dpy, VisualScreenMask, &visualTemplate,
|
||||
&nVisualsMatched);
|
||||
if (nVisualsMatched == 0) {
|
||||
if (visualList == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue