summaryrefslogtreecommitdiff
path: root/src/sna/sna_video_textured.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-15 19:55:50 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-15 19:55:50 +0000
commitcc4b616990fa71e96d38512d8cdb4c3e2abb21c0 (patch)
tree4f8d2156b90c13dfbb825a89ddf0f8501cac0dd8 /src/sna/sna_video_textured.c
parent7f480ba02c66fcc02bad483731c4c0cf6c746c0d (diff)
sna/video: Increase the level of paranoia
In how many different ways can we check that the scanout is allocated before we start decoding video? Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_video_textured.c')
-rw-r--r--src/sna/sna_video_textured.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c
index ba0e146c..a72d3351 100644
--- a/src/sna/sna_video_textured.c
+++ b/src/sna/sna_video_textured.c
@@ -229,7 +229,10 @@ sna_video_textured_put_image(ScrnInfoPtr scrn,
Bool flush = false;
Bool ret;
- if (!sna_pixmap(pixmap))
+ if (buf == 0)
+ return BadAlloc;
+
+ if (!sna_pixmap_is_gpu(pixmap))
return BadAlloc;
sna_video_frame_init(sna, video, id, width, height, &frame);