From 37c525a11c0fab4e279e80ad24e5cf791239e005 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 14 Dec 2011 16:26:46 +0000 Subject: [PATCH] sna: Skip glyphs if we fail to allocate pixel data for them Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 2 ++ 1 file changed, 2 insertions(+) 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;