diff options
authorChris Wilson <>2011-08-29 10:46:46 +0100
committerChris Wilson <>2011-08-29 10:47:45 +0100
commit0ac4b974b90a5614d1114d5e211cb4b986a89454 (patch)
parent0a74cd77a3f462d5d2707bf1f35663279bcb9be5 (diff)
sna/video: Defend against PutImage to a broken screen
Similar to the previous commit, check that the Screen Pixmap is bound to a bo before proceeding. [Note that in this case, the absence of the bo would have been picked up much later after doing all of the setup...] Signed-off-by: Chris Wilson <>
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c
index 46b95ee8..0e7a2914 100644
--- a/src/sna/sna_video_textured.c
+++ b/src/sna/sna_video_textured.c
@@ -240,6 +240,9 @@ sna_video_textured_put_image(ScrnInfoPtr scrn,
int top, left, npixels, nlines;
Bool flush = false;
+ if (!sna_pixmap(pixmap))
+ return BadAlloc;
if (!sna_video_clip_helper(scrn, video, &crtc, &dstBox,
src_x, src_y, drw_x, drw_y,
src_w, src_h, drw_w, drw_h,