From 11c2586bdb474cd4f2d122cbc12aa96ee8bc3343 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 27 Dec 2023 10:59:36 -0500 Subject: [PATCH] static analyzer bit for pickup.c src/pickup.c(3266): warning: Dereferencing NULL pointer 'otmp'. --- src/pickup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pickup.c b/src/pickup.c index 20acf61ab..6474c9973 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -3262,6 +3262,7 @@ menu_loot(int retry, boolean put_in) n_looted = n; for (i = 0; i < n; i++) { otmp = pick_list[i].item.a_obj; + assert(otmp != 0); count = pick_list[i].count; if (count > 0 && count < otmp->quan) { otmp = splitobj(otmp, count);