summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2006-12-28 22:23:16 -0800
committerKeith Packard <keithp@neko.keithp.com>2006-12-28 22:23:16 -0800
commitb8692e646227e56c9ae4f72b9aaa75457b4c0f5f (patch)
tree25e1e6808e8b3b51319de85534d0bc1d7cc19852
parent973da654219ea43916b0b44acfa09a415bed3d7a (diff)
Lack of configured monitor implies no configured modes.
Missing check for missing monitor configuration would result in segfault.
-rw-r--r--src/i830_xf86Modes.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/i830_xf86Modes.c b/src/i830_xf86Modes.c
index 58a6e6f9..3a272cbc 100644
--- a/src/i830_xf86Modes.c
+++ b/src/i830_xf86Modes.c
@@ -609,6 +609,9 @@ i830xf86GetMonitorModes (ScrnInfoPtr pScrn, XF86ConfMonitorPtr conf_monitor)
DisplayModePtr modes = NULL;
XF86ConfModesLinkPtr modes_link;
+ if (!conf_monitor)
+ return NULL;
+
/*
* first we collect the mode lines from the UseModes directive
*/