static analyzer bits for pager.c

src/pager.c(209): warning: Dereferencing NULL pointer 'otmp'.
This commit is contained in:
nhmall
2023-12-27 10:56:00 -05:00
parent e138f497ff
commit 2f5fc70f02

View File

@@ -205,7 +205,7 @@ mhidden_description(
Strcat(outbuf, (otmp && otmp->otyp != STRANGE_OBJECT)
? ansimpleoname(otmp)
: an(obj_descr[STRANGE_OBJECT].oc_name));
if (fakeobj) {
if (fakeobj && otmp) {
otmp->where = OBJ_FREE; /* object_from_map set to OBJ_FLOOR */
dealloc_obj(otmp);
}