summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alex@botch2.com>2007-03-26 23:26:51 -0400
committerAlex Deucher <alex@botch2.com>2007-03-26 23:26:51 -0400
commitfca30a6b581cb6c1466ab1bc316df8fed5d82b60 (patch)
tree4d88766c22d5f7dafbf79ab2f2578833860cf20f
parent97d8d1ed10d069343f2b3172ba64ca421821a602 (diff)
fix NULL dereference
when IsSecondary is true, crtc1 is NULL Noticed by Sverre Froyen.
-rw-r--r--src/radeon_driver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 28580a5..1bd6884 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -6328,7 +6328,7 @@ static Bool RADEONInit2(ScrnInfoPtr pScrn, DisplayModePtr crtc1,
{
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
- double dot_clock = crtc1->Clock/1000.0;
+ double dot_clock;
RADEONInfoPtr info0 = NULL;
ScrnInfoPtr pScrn0 = NULL;
@@ -6358,7 +6358,7 @@ static Bool RADEONInit2(ScrnInfoPtr pScrn, DisplayModePtr crtc1,
ErrorF("\n");
ErrorF("%-12.12s %7.2f %4d %4d %4d %4d %4d %4d %4d %4d (%d,%d)",
crtc1->name,
- dot_clock,
+ crtc1->Clock/1000.0,
crtc1->CrtcHDisplay,
crtc1->CrtcHSyncStart,