Skip to content

Commit

Permalink
Fix crash when dropping items (CleverRaven#49055)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhilkinSerg authored May 28, 2021
1 parent 099e4a5 commit deb7618
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3267,7 +3267,7 @@ void Character::drop( const drop_locations &what, const tripoint &target,
const cata::optional<vpart_reference> vp = get_map().veh_at(
target ).part_with_feature( "CARGO", false );
if( rl_dist( pos(), target ) > 1 || !( stash || get_map().can_put_items( target ) )
|| vp->part().is_cleaner_on() ) {
|| ( vp.has_value() && vp->part().is_cleaner_on() ) ) {
add_msg_player_or_npc( m_info, _( "You can't place items here!" ),
_( "<npcname> can't place items here!" ) );
return;
Expand Down

0 comments on commit deb7618

Please sign in to comment.