diff options
author | Francisco Jerez <currojerez@riseup.net> | 2010-06-16 14:59:37 +0200 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2010-06-22 01:39:49 +0200 |
commit | 8087bc23a7662f1426a8bd6febf0d5d3844e6107 (patch) | |
tree | 80fc43f74d755a17a08102ff55c5368d387e9657 /src | |
parent | 2de1f7ae0b4441c1501568358acf2b870bb9dcc6 (diff) |
xv: Make sure we have a CRTC before setting up the overlay.
Fixes a segfault when the destination area is off screen.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Tested-by: Krzysztof Halasa <khc@pm.waw.pl>
Diffstat (limited to 'src')
-rw-r--r-- | src/smi_video.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/smi_video.c b/src/smi_video.c index c2e8868..57587ac 100644 --- a/src/smi_video.c +++ b/src/smi_video.c @@ -1060,7 +1060,7 @@ SMI_PutVideo( if(!xf86_crtc_clip_video_helper(pScrn, &crtc, crtcConf->crtc[0], &dstBox, &x1, &x2, &y1, &y2, clipBoxes, width, height)) LEAVE(Success); - if(pSmi->Dualhead && crtc == crtcConf->crtc[1]) + if (crtc != crtcConf->crtc[0]) LEAVE(Success); /* Transform dstBox to the CRTC coordinates */ @@ -1521,6 +1521,9 @@ SMI_PutImage( width, height)) LEAVE(Success); + if (!crtc) + LEAVE(Success); + /* Transform dstBox to the CRTC coordinates */ dstBox.x1 -= crtc->x; dstBox.y1 -= crtc->y; @@ -2468,6 +2471,9 @@ SMI_DisplaySurface( &x1, &x2, &y1, &y2, clipBoxes, surface->width, surface->height)) LEAVE(Success); + if (!crtc) + LEAVE(Success); + /* Transform dstBox to the CRTC coordinates */ dstBox.x1 -= crtc->x; dstBox.y1 -= crtc->y; |