From 9bbba2bcccab0a027f00414217857815aed9e607 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 30 Mar 2026 18:07:15 -0700 Subject: [PATCH] render: handle -Wanalyzer-null-dereference in AllocateGlyphHash() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported in #1817: xwayland-24.1.6/redhat-linux-build/../render/glyph.c:388:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘hashSet’ Signed-off-by: Alan Coopersmith Part-of: --- render/glyph.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/render/glyph.c b/render/glyph.c index 38113034d..2b061ca2b 100644 --- a/render/glyph.c +++ b/render/glyph.c @@ -385,6 +385,8 @@ AllocateGlyph(xGlyphInfo * gi, int fdepth) static Bool AllocateGlyphHash(GlyphHashPtr hash, GlyphHashSetPtr hashSet) { + if (hashSet == NULL) + return FALSE; hash->table = calloc(hashSet->size, sizeof(GlyphRefRec)); if (!hash->table) return FALSE;