xfree86: don't crash in AutoConfig if the primary device is not pci

Only call matchDriverFromFiles() if we found a pci device.
Debian bug#472823 (http://bugs.debian.org/472823).
This commit is contained in:
Goneri Le Bouder 2008-04-01 20:19:40 +02:00 committed by Julien Cristau
parent 37b1258f0a
commit 9500033b9e

View File

@ -436,9 +436,10 @@ chooseVideoDriver(void)
if (!info) {
ErrorF("Primary device is not PCI\n");
}
#ifdef __linux__
matchDriverFromFiles(matches, info->vendor_id, info->device_id);
else {
matchDriverFromFiles(matches, info->vendor_id, info->device_id);
}
#endif /* __linux__ */
/* TODO Handle multiple drivers claiming to support the same PCI ID */