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>
This commit is contained in:
parent
a2e7904b1d
commit
db3aa4e03b
|
@ -509,6 +509,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