summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2006-07-11 10:21:51 -0700
committerEric Anholt <anholt@FreeBSD.org>2006-07-11 10:21:51 -0700
commit5a2e04bd1b700a8a6e26136b8831ef5e4d11b565 (patch)
treededa32c2677251c41021201c5d21c3fcd3ad760a
parentf9499a68da0ce459fed0b29b998678fd81898a51 (diff)
Fix crash with DDC when there are no user modes to add.
-rw-r--r--src/i830_modes.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/i830_modes.c b/src/i830_modes.c
index 1a572d16..ac25864c 100644
--- a/src/i830_modes.c
+++ b/src/i830_modes.c
@@ -1,3 +1,4 @@
+/* -*- c-basic-offset: 4 -*- */
#define DEBUG_VERB 2
/*
@@ -548,6 +549,9 @@ i830AppendModes(ScrnInfoPtr pScrn, DisplayModePtr *modeList,
DisplayModePtr first = *modeList;
DisplayModePtr last = i830GetModeListTail(first);
+ if (addModes == NULL)
+ return;
+
if (first == NULL) {
*modeList = addModes;
} else {