summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2010-06-12 08:19:16 -0700
committerJulien Cristau <jcristau@debian.org>2010-11-11 13:16:10 +0100
commit8981b0a99ca5828ddc1b375c269aa493af40e6fd (patch)
tree35d38c7af130008330f2e1ed90264c01def5f34a
parenta3e6e599f50902712f4a10fdbf806371335aaed3 (diff)
Don't coredump on "X -showopts" (bug 25874)
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 <alan.coopersmith@oracle.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit b8615d592700b7be319c04cc0563fdeb5a266534)
-rw-r--r--hw/xfree86/common/xf86Helper.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 1cc1526c9..512b39e78 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1447,6 +1447,13 @@ xf86MatchDevice(const char *drivername, GDevPtr **sectlist)
if (xf86DoConfigure && xf86DoConfigurePass1) return 1;
/*
+ * This can happen when running Xorg -showopts and a module like ati
+ * or vmware tries to load its 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.