From 9500033b9ecdfaf5a56a4355ffc94d74cb17ca17 Mon Sep 17 00:00:00 2001 From: Goneri Le Bouder Date: Tue, 01 Apr 2008 18:19:40 +0000 Subject: 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). --- diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c index 268b50c..3210e44 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 */ -- cgit v0.7.2-37-g538c