From d3bc1669d3933d04898fa51e2030a8413b7f59bd Mon Sep 17 00:00:00 2001 From: GuySten <62616591+GuySten@users.noreply.github.com> Date: Fri, 17 Jul 2026 15:40:16 +0300 Subject: [PATCH] Access element subshell map data only if it has atomic relaxation data (#4020) --- src/physics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/physics.cpp b/src/physics.cpp index dcc771329..4a8b4d368 100644 --- a/src/physics.cpp +++ b/src/physics.cpp @@ -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); }