From 8d5ffbd6e311071c9e2db7409b63850929af20e1 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 1 Jun 2025 22:31:09 -0400 Subject: [PATCH] permapoisoned follow-up otmp can be 0 in mk_artifact. In fact, it is explicitly being set to 0 three lines above the recently added call to permapoisoned(). The static analyzer was griping also. --- src/artifact.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/artifact.c b/src/artifact.c index d180cb2fb..e4f4c89bf 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -301,7 +301,7 @@ mk_artifact( otmp = 0; } /* otherwise, otmp has not changed; just fallthrough to return it */ } - if (permapoisoned(otmp)) + if (otmp && permapoisoned(otmp)) otmp->opoisoned = 1; return otmp; }