diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-04-04 15:56:38 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-04-04 15:56:38 +0100 |
commit | 938eea6dee0be153fcf007549a50213f6c957305 (patch) | |
tree | efce76a253404bf802da02b9152a05b2be879c7f /src/sna/gen3_render.c | |
parent | 564e4a9878503c880e0cbd09d88b4c246a0267b6 (diff) |
sna/gen2+: Beware the unattached ShmPixmap
When dereferences priv, make sure it exists first. ShmPixmaps for
example, may not have one, nor do very small buffers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen3_render.c')
-rw-r--r-- | src/sna/gen3_render.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c index a30ee441..1bfc509c 100644 --- a/src/sna/gen3_render.c +++ b/src/sna/gen3_render.c @@ -3100,7 +3100,7 @@ gen3_composite_picture(struct sna *sna, x + w < pixmap->drawable.width && y + h < pixmap->drawable.height)) { struct sna_pixmap *priv = sna_pixmap(pixmap); - if (priv->clear) { + if (priv && priv->clear) { DBG(("%s: converting large pixmap source into solid [%08x]\n", __FUNCTION__, priv->clear_color)); return gen3_init_solid(channel, priv->clear_color); } |