summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/radeon_driver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index f8172306..5b078b92 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -3485,8 +3485,9 @@ static int RADEONValidateFPModes(ScrnInfoPtr pScrn, char **ppModeName)
new->next = NULL;
new->prev = last;
- last->next = new;
+ if (last) last->next = new;
last = new;
+ if (!first) first = new;
}
}
}