--- hw/xfree86/common/xf86Config.c	5 Jul 2006 18:38:47 -0000	1.1.1.1
+++ hw/xfree86/common/xf86Config.c	2 Dec 2006 19:18:25 -0000
@@ -508,6 +508,9 @@ GenerateDriverlist(char * dirname, char 
     const char *subdirs[] = { dirname, NULL };
     static const char *patlist[] = {"(.*)_drv\\.so", "(.*)_drv\\.o", NULL};
     ret = LoaderListDirs(subdirs, patlist);
+
+    if ((char **)0 == ret)
+      FatalError("No valid drivers found in `%s'.", dirname);
     
     /* fix up the probe order for video drivers */
     if (strstr(dirname, "drivers"))
