diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-08-29 10:46:46 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-08-29 10:47:45 +0100 |
commit | 0ac4b974b90a5614d1114d5e211cb4b986a89454 (patch) | |
tree | 1f416284b747ee48e87751a90cbd3a42f6910ba3 /src/sna/sna_video_textured.c | |
parent | 0a74cd77a3f462d5d2707bf1f35663279bcb9be5 (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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_video_textured.c')
-rw-r--r-- | src/sna/sna_video_textured.c | 3 |
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, |