summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-12-14 16:26:46 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-12-14 16:26:46 +0000
commit37c525a11c0fab4e279e80ad24e5cf791239e005 (patch)
tree7494ce77d3fa16638a7fa26474a890a5ae92974a
parent6a8188bb4dd0eba58e29803566023ad5c3d4d58a (diff)
sna: Skip glyphs if we fail to allocate pixel data for them
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index a730006a..64bdd05c 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -7506,6 +7506,8 @@ static bool sna_set_glyph(CharInfoPtr in, CharInfoPtr out)
out->metrics = in->metrics;
out->bits = malloc(w*h);
+ if (out->bits == NULL)
+ return false;
src = (uint8_t *)in->bits;
dst = (uint8_t *)out->bits;