Fix crash with DDC when there are no user modes to add.

This commit is contained in:
Eric Anholt 2006-07-11 10:21:51 -07:00
parent f9499a68da
commit 5a2e04bd1b
1 changed files with 4 additions and 0 deletions

View File

@ -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 {