diff --git a/src/npcmove.cpp b/src/npcmove.cpp index a1ac030171e7f..6bcbd7f43021e 100644 --- a/src/npcmove.cpp +++ b/src/npcmove.cpp @@ -2712,6 +2712,10 @@ int npc::confident_throw_range( const item &thrown, Creature *target ) const // Index defaults to -1, i.e., wielded weapon bool npc::wont_hit_friend( const tripoint &tar, const item &it, bool throwing ) const { + if( !throwing && it.is_gun() && it.empty() ) { + return true; // Prevent calling nullptr ammo_data + } + if( throwing && rl_dist( pos(), tar ) == 1 ) { return true; // If we're *really* sure that our aim is dead-on }