access element subshell map data only if it has atomic relaxation data

This commit is contained in:
GuySten 2026-07-15 21:20:56 +03:00
parent 243c249533
commit f8978bccaf

View file

@ -359,8 +359,8 @@ void sample_photon_reaction(Particle& p)
// Allow electrons to fill orbital and produce Auger electrons and
// fluorescent photons. Since Compton subshell data does not match atomic
// relaxation data, use the mapping between the data to find the subshell
if (settings::atomic_relaxation && i_shell >= 0 &&
element.subshell_map_[i_shell] >= 0) {
if (settings::atomic_relaxation && element.has_atomic_relaxation_ &&
i_shell >= 0 && element.subshell_map_[i_shell] >= 0) {
element.atomic_relaxation(element.subshell_map_[i_shell], p);
}