summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2010-07-13 11:57:15 +0100
committerJulien Cristau <jcristau@debian.org>2010-07-13 11:57:15 +0100
commite647511e4b9b924b0617171c56b3bb485674b3ff (patch)
tree3ab10dc330bcee90ec32ce4ac3c4d2868175bb24
parent0bd99bb142093c0072147ec3bb665864b4cadef5 (diff)
Don't crash the server on Xorg -configure
-rw-r--r--src/vmwaremodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vmwaremodule.c b/src/vmwaremodule.c
index 3d7f666..9cc180a 100644
--- a/src/vmwaremodule.c
+++ b/src/vmwaremodule.c
@@ -172,7 +172,8 @@ vmware_chain_module(pointer opts)
matched = vmwlegacy_devices;
}
- for (i = 0; i < vmware_devices; i++) {
+ /* Xorg -configure returns 1 from xf86MatchDevice with NULL gdevs */
+ for (i = 0; gdevs && i < vmware_devices; i++) {
gdev = gdevs[i];
gdev->driver = driver_name;
}