summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-04-10 14:43:28 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-04-10 14:43:28 +0100
commitc8502e350cb18f6f5d821d237ffcee453f347eba (patch)
treecffdec5be78daf2260c82d364cdf4c423da9bfe4
parent9cc6f7ccc55cc11f47b3b7d626c9f5a7c1327d57 (diff)
sna: Add missing alloc failure check for creating tile source
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 083cd3c4..ab2997d1 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -8767,6 +8767,9 @@ sna_pixmap_get_source_bo(PixmapPtr pixmap)
pixmap->drawable.bitsPerPixel,
KGEM_BUFFER_WRITE_INPLACE,
&ptr);
+ if (upload == NULL)
+ return NULL;
+
memcpy_blt(pixmap->devPrivate.ptr, ptr,
pixmap->drawable.bitsPerPixel,
pixmap->devKind, upload->pitch,