Fix segfault when carried box explodes
Opening a trapped box in inventory, if the box exploded and was not destroyed, then temporary variable otmp was pointing to null.
This commit is contained in:
@@ -6400,7 +6400,7 @@ chest_trap(
|
||||
bot(); /* to get immediate botl re-display */
|
||||
}
|
||||
|
||||
otmp->tknown = 1; /* hero knows chest is no longer trapped */
|
||||
obj->tknown = 1; /* hero knows chest is no longer trapped */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user