From 9500033b9ecdfaf5a56a4355ffc94d74cb17ca17 Mon Sep 17 00:00:00 2001 From: Goneri Le Bouder Date: Tue, 1 Apr 2008 20:19:40 +0200 Subject: [PATCH] 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). --- hw/xfree86/common/xf86AutoConfig.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c index 268b50cb5..3210e4460 100644 --- a/hw/xfree86/common/xf86AutoConfig.c +++ b/hw/xfree86/common/xf86AutoConfig.c @@ -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 */