# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/xorg-server/hotfix-lookupmode.patch # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c index 136cd15d0..a28973ead 100644 --- a/hw/xfree86/common/xf86Mode.c +++ b/hw/xfree86/common/xf86Mode.c @@ -509,6 +509,8 @@ xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, /* scan through the modes in the sort order above */ if ((p->type & type) != type) continue; + if (p->name == NULL) + continue; if (strcmp(p->name, modep->name) == 0) {