[PR #2190] render: handle -Wanalyzer-null-dereference in AllocateGlyphHash()

PR: https://github.com/X11Libre/xserver/pull/2190
This commit is contained in:
Alan Coopersmith
2026-03-30 18:07:15 -07:00
committed by Enrico Weigelt, metux IT consult
parent 6530d1a84e
commit 36d24b6a20

View File

@@ -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;