From 4b6ba491c0a6534d9c095fa75a83b13a70734584 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 11 Jun 2010 11:26:12 -0700 Subject: [PATCH] Bug 25874 - coredump on "X -showopts" Don't try walking the xf86ConfigLayout.screens table if it's empty https://bugs.freedesktop.org/show_bug.cgi?id=25874 Signed-off-by: Alan Coopersmith --- hw/xfree86/common/xf86Helper.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index cd48914..6978c63 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -1441,6 +1441,13 @@ xf86MatchDevice(const char *drivername, GDevPtr **sectlist) *sectlist = NULL; /* + * This can happen when running Xorg -showopts and a module like ati + * or vmware tries to load it's submodules when xf86ConfigLayout is empty + */ + if ( !xf86ConfigLayout.screens ) + return 0; + + /* * This is a very important function that matches the device sections * as they show up in the config file with the drivers that the server * loads at run time. -- 1.5.6.5