diff options
author | Kalev Lember <kalev@smartlink.ee> | 2009-03-20 02:21:41 +0200 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-03-31 17:04:37 -0700 |
commit | 948fa20bd639752af3a6f1b30a0b2b356d0bc9a5 (patch) | |
tree | 73c95d1fd84472270977b37859aedba61e40f225 /src/i830_video.c | |
parent | 79aebcb7f6b7f0bed6cdce34e2e3086dc6bf9b3c (diff) |
Fix VT switch with XV overlay video enabled.
drm_intel_bo_unpin() was called with NULL argument.
Signed-off-by: Kalev Lember <kalev@smartlink.ee>
(cherry picked from commit 74d0713e002a9781ed00fdd10eb6f75907ae796c)
Diffstat (limited to 'src/i830_video.c')
-rw-r--r-- | src/i830_video.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/i830_video.c b/src/i830_video.c index 3c6fbf36..3f3aaacf 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -1048,11 +1048,14 @@ I830StopVideo(ScrnInfoPtr pScrn, pointer data, Bool shutdown) if (pPriv->videoStatus & CLIENT_VIDEO_ON) { i830_overlay_off(pScrn); } - if (!pPriv->textured) - drm_intel_bo_unpin(pPriv->buf); - drm_intel_bo_unreference(pPriv->buf); - pPriv->buf = NULL; - pPriv->videoStatus = 0; + + if (pPriv->buf) { + if (!pPriv->textured) + drm_intel_bo_unpin(pPriv->buf); + drm_intel_bo_unreference(pPriv->buf); + pPriv->buf = NULL; + pPriv->videoStatus = 0; + } } else { if (pPriv->videoStatus & CLIENT_VIDEO_ON) { pPriv->videoStatus |= OFF_TIMER; |