Fixed crash due to invalid m_pAutoTarget after gating