From 25b68fb3de00648d349628c50351f488681a5502 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 30 Mar 2026 18:07:15 -0700 Subject: [PATCH] [PR #2189] render: handle -Wanalyzer-null-dereference in AllocateGlyphHash() PR: https://github.com/X11Libre/xserver/pull/2189 --- render/glyph.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/render/glyph.c b/render/glyph.c index 3f6b8cbf0..23977c6b0 100644 --- a/render/glyph.c +++ b/render/glyph.c @@ -386,7 +386,8 @@ AllocateGlyph(xGlyphInfo * gi, int fdepth) static Bool AllocateGlyphHash(GlyphHashPtr hash, GlyphHashSetPtr hashSet) { - assert(hashSet); + if (hashSet == NULL) + return FALSE; hash->table = calloc(hashSet->size, sizeof(GlyphRefRec)); if (!hash->table) return FALSE;