diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c index 81a454b23..3356224ce 100644 --- a/hw/xfree86/parser/scan.c +++ b/hw/xfree86/parser/scan.c @@ -1046,6 +1046,8 @@ xf86nameCompare(const char *s1, const char *s2) return 0; else return 1; + } else if (!s2 || *s2 == 0) { + return -1; } while (*s1 == '_' || *s1 == ' ' || *s1 == '\t')