diff --git a/render/render.c b/render/render.c index bba1ce1e6..9aabcfb20 100644 --- a/render/render.c +++ b/render/render.c @@ -1140,6 +1140,12 @@ ProcRenderAddGlyphs (ClientPtr client) width, height, depth, CREATE_PIXMAP_USAGE_GLYPH_PICTURE); + if (!pDstPix) + { + err = BadAlloc; + goto bail; + } + GlyphPicture (glyph)[screen] = pDst = CreatePicture (0, &pDstPix->drawable, glyphSet->format, @@ -1149,6 +1155,7 @@ ProcRenderAddGlyphs (ClientPtr client) /* The picture takes a reference to the pixmap, so we drop ours. */ (pScreen->DestroyPixmap) (pDstPix); + pDstPix = NULL; if (! pDst) {