summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-03-09 23:49:46 +0100
committerMichel Dänzer <michel@tungstengraphics.com>2007-03-09 23:49:46 +0100
commit3c2d6e07bdf8daef6486b594aef0d22460eb2585 (patch)
treef8fa4fa2cf6c41ff04b52af22b91fa67bf53d136 /src
parent7518b8959ee7598f3526365a83ea7e143a5d6a4e (diff)
Don't crash when the SAREA pointer is NULL.i830-pageflip
Diffstat (limited to 'src')
-rw-r--r--src/i830_display.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/i830_display.c b/src/i830_display.c
index 78557126..d230f74f 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -395,6 +395,9 @@ i830PipeSetBase(xf86CrtcPtr crtc, int x, int y)
if (pI830->directRenderingEnabled) {
drmI830Sarea *sPriv = (drmI830Sarea *) DRIGetSAREAPrivate(pScrn->pScreen);
+ if (!sPriv)
+ return;
+
switch (pipe) {
case 0:
sPriv->pipeA_x = x;
@@ -516,6 +519,9 @@ i830_crtc_dpms(xf86CrtcPtr crtc, int mode)
drmI830Sarea *sPriv = (drmI830Sarea *) DRIGetSAREAPrivate(pScrn->pScreen);
Bool enabled = crtc->enabled && mode != DPMSModeOff;
+ if (!sPriv)
+ return;
+
switch (pipe) {
case 0:
sPriv->pipeA_w = enabled ? crtc->mode.HDisplay : 0;