hw/xfree86: fix NULL pointer refrence to mode name
Potentially, the pointer to the mode name could be unset, this can
occur with the xf86-video-nv DDX, in that case there isnt much we can do
except check if the next mode is any better.
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
---
(cherry picked from db3aa4e03b
)
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1309>
This commit is contained in:
parent
8b75ec34df
commit
f653d9a0af
|
@ -507,6 +507,8 @@ xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep,
|
||||||
/* scan through the modes in the sort order above */
|
/* scan through the modes in the sort order above */
|
||||||
if ((p->type & type) != type)
|
if ((p->type & type) != type)
|
||||||
continue;
|
continue;
|
||||||
|
if (p->name == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (strcmp(p->name, modep->name) == 0) {
|
if (strcmp(p->name, modep->name) == 0) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue