From 36d24b6a20936d5c81aec3fd58645630801c509f Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 30 Mar 2026 18:07:15 -0700 Subject: [PATCH] [PR #2190] render: handle -Wanalyzer-null-dereference in AllocateGlyphHash() PR: https://github.com/X11Libre/xserver/pull/2190 --- render/glyph.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/render/glyph.c b/render/glyph.c index f624be97b..90c387731 100644 --- a/render/glyph.c +++ b/render/glyph.c @@ -382,7 +382,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;