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

PR: https://github.com/X11Libre/xserver/pull/2189
This commit is contained in:
Alan Coopersmith
2026-03-30 18:07:15 -07:00
committed by Enrico Weigelt, metux IT consult
parent 0b8a7a4783
commit 25b68fb3de

View File

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