summaryrefslogtreecommitdiff
path: root/src/radeon_crtc.c
diff options
context:
space:
mode:
authorAlex Deucher <alex@samba.(none)>2008-01-03 15:47:50 -0500
committerAlex Deucher <alex@samba.(none)>2008-01-03 15:47:50 -0500
commit2e4473b63d65801ae8ac5a8391de232b2201d958 (patch)
tree058e401243144230f8f9e9eb2b7e976704628148 /src/radeon_crtc.c
parentc652208861bffca94f06b7f67688ce220e050bfb (diff)
RADEON: fix crash when setting rotation in the config file
xf86CrtcRotate() accesses pScrn->pScreen which is not set during ScreenInit(). This should also be fixed in the server. See bug 12129
Diffstat (limited to 'src/radeon_crtc.c')
-rw-r--r--src/radeon_crtc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c
index 207a5a67..585b452e 100644
--- a/src/radeon_crtc.c
+++ b/src/radeon_crtc.c
@@ -361,7 +361,8 @@ static void *
radeon_crtc_shadow_allocate (xf86CrtcPtr crtc, int width, int height)
{
ScrnInfoPtr pScrn = crtc->scrn;
- ScreenPtr pScreen = pScrn->pScreen;
+ /* if this is called during ScreenInit() we don't have pScrn->pScreen yet */
+ ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
unsigned long rotate_pitch;