static analyzer bits for pager.c
src/pager.c(209): warning: Dereferencing NULL pointer 'otmp'.
This commit is contained in:
@@ -205,7 +205,7 @@ mhidden_description(
|
|||||||
Strcat(outbuf, (otmp && otmp->otyp != STRANGE_OBJECT)
|
Strcat(outbuf, (otmp && otmp->otyp != STRANGE_OBJECT)
|
||||||
? ansimpleoname(otmp)
|
? ansimpleoname(otmp)
|
||||||
: an(obj_descr[STRANGE_OBJECT].oc_name));
|
: an(obj_descr[STRANGE_OBJECT].oc_name));
|
||||||
if (fakeobj) {
|
if (fakeobj && otmp) {
|
||||||
otmp->where = OBJ_FREE; /* object_from_map set to OBJ_FLOOR */
|
otmp->where = OBJ_FREE; /* object_from_map set to OBJ_FLOOR */
|
||||||
dealloc_obj(otmp);
|
dealloc_obj(otmp);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user