diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-04 12:21:27 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-04 12:31:09 +0100 |
commit | 72a29aa74a1488269c2184300e573d060c49e232 (patch) | |
tree | 7c48695e2b0f3a10d1e1de07fbbd140cbd7e6811 /src/sna/sna_render.c | |
parent | 9bff89b1892cee90a80909255876240126b700b2 (diff) |
sna: Check that the buffer was allocated prior to caching it
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_render.c')
-rw-r--r-- | src/sna/sna_render.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c index 7feaa24f..c3c66663 100644 --- a/src/sna/sna_render.c +++ b/src/sna/sna_render.c @@ -1139,7 +1139,8 @@ sna_render_picture_extract(struct sna *sna, &box, pixmap->devKind, pixmap->drawable.bitsPerPixel); - if (pixmap->usage_hint == 0 && + if (bo != NULL && + pixmap->usage_hint == 0 && box.x2 - box.x1 == pixmap->drawable.width && box.y2 - box.y1 == pixmap->drawable.height) { struct sna_pixmap *priv = sna_pixmap(pixmap); |