Skip to content

Commit

Permalink
Don't coredump on "X -showopts" (bug 25874)
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Tiago Vignatti <[email protected]>
Signed-off-by: Keith Packard <[email protected]>
  • Loading branch information
alanc authored and keith-packard committed Jun 18, 2010
1 parent 32fd575 commit b8615d5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hw/xfree86/common/xf86Helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,13 @@ xf86MatchDevice(const char *drivername, GDevPtr **sectlist)
if (sectlist)
*sectlist = NULL;

/*
* 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
Expand Down

0 comments on commit b8615d5

Please sign in to comment.