From 9b7694d2c5a0c28d877c0a498a6b8fdf915eebe3 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 23 Dec 2023 23:14:17 -0500 Subject: [PATCH] static analyzer bit for ball.c src/ball.c(50): warning C6011: Dereferencing NULL pointer 'uball'. --- src/ball.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ball.c b/src/ball.c index 31231fe48..7f76485ea 100644 --- a/src/ball.c +++ b/src/ball.c @@ -44,7 +44,7 @@ ballfall(void) { boolean gets_hit; - if (uball && carried(uball) && welded(uball)) + if (!uball || (uball && carried(uball) && welded(uball))) return; gets_hit = (((uball->ox != u.ux) || (uball->oy != u.uy))