summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalev Lember <kalev@smartlink.ee>2009-03-20 02:21:41 +0200
committerEric Anholt <eric@anholt.net>2009-03-20 16:46:13 -0700
commit74d0713e002a9781ed00fdd10eb6f75907ae796c (patch)
treebc4424a92fd21b56c995c163927d51b15147381f
parentb345b4e6adf00f8b2626e5c2563fc159e2295cc5 (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>
-rw-r--r--src/i830_video.c13
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;