From 5a2e04bd1b700a8a6e26136b8831ef5e4d11b565 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 11 Jul 2006 10:21:51 -0700 Subject: Fix crash with DDC when there are no user modes to add. --- src/i830_modes.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/i830_modes.c') 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 { -- cgit v1.2.3