remove unnecessary null-check on hmon_hitmon_poison()

`obj` here is always non-null, otherwise it leads segv at earlier code.
This commit is contained in:
SHIRAKATA Kentaro
2023-12-11 13:47:07 +09:00
parent c2802dba2d
commit 5de1f6e5ed
+1 -1
View File
@@ -1453,7 +1453,7 @@ hmon_hitmon_poison(
You_feel("like an evil coward for using a poisoned weapon."); You_feel("like an evil coward for using a poisoned weapon.");
adjalign(-1); adjalign(-1);
} }
if (obj && !rn2(nopoison)) { if (!rn2(nopoison)) {
/* remove poison now in case obj ends up in a bones file */ /* remove poison now in case obj ends up in a bones file */
obj->opoisoned = FALSE; obj->opoisoned = FALSE;
/* defer "obj is no longer poisoned" until after hit message */ /* defer "obj is no longer poisoned" until after hit message */