Skip to content

Commit

Permalink
Merge pull request #35504 from Fris0uman/stop_spilling_ur_nones
Browse files Browse the repository at this point in the history
Fixes none dropping
  • Loading branch information
ZhilkinSerg authored Nov 13, 2019
2 parents 859b556 + 2b666e9 commit 1baef90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2048,7 +2048,7 @@ void player::apply_damage( Creature *source, body_part hurt, int dam, const bool
g->events().send<event_type::character_takes_damage>( getID(), dam_to_bodypart );

if( hp_cur[hurtpart] <= 0 && ( source == nullptr || !source->is_hallucination() ) ) {
if( !can_wield( weapon ).success() ) {
if( !weapon.is_null() && !can_wield( weapon ).success() ) {
put_into_vehicle_or_drop( *this, item_drop_reason::tumbling, { weapon } );
i_rem( &weapon );
}
Expand Down

0 comments on commit 1baef90

Please sign in to comment.