diff --git a/src/ranged.cpp b/src/ranged.cpp index ff4a537f1965e..92acf27f72491 100644 --- a/src/ranged.cpp +++ b/src/ranged.cpp @@ -1168,7 +1168,7 @@ static void update_targets( player &pc, int range, std::vector &targ if( local_last_tgt_pos ) { dst = *local_last_tgt_pos; } - if( ( pc.last_target.expired() || !pc.sees( *pc.last_target.lock().get() ) ) && + if( ( pc.last_target.expired() || !pc.sees( *pc.last_target.lock() ) ) && pc.has_activity( activity_id( "ACT_AIM" ) ) ) { //We lost our target. Stop auto aiming. pc.cancel_activity();