diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-15 19:55:50 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-15 19:55:50 +0000 |
commit | cc4b616990fa71e96d38512d8cdb4c3e2abb21c0 (patch) | |
tree | 4f8d2156b90c13dfbb825a89ddf0f8501cac0dd8 /src/sna/sna_video_textured.c | |
parent | 7f480ba02c66fcc02bad483731c4c0cf6c746c0d (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.c | 5 |
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); |