From 0ee3af47e003297328fc205af6c53b10f700bf1d Mon Sep 17 00:00:00 2001 From: David Sagan Date: Sat, 7 Oct 2023 16:36:38 -0400 Subject: [PATCH] Minor bug fix. --- bmad/code/create_element_slice.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bmad/code/create_element_slice.f90 b/bmad/code/create_element_slice.f90 index 3f12927c6c..13bbc2fb6e 100644 --- a/bmad/code/create_element_slice.f90 +++ b/bmad/code/create_element_slice.f90 @@ -141,7 +141,7 @@ recursive subroutine create_element_slice (sliced_ele, ele_in, l_slice, offset, (ele_in%tracking_method == bmad_standard$ .or. ele_in%field_calc == bmad_standard$)) then select case (ele_in%key) case (sbend$, quadrupole$, sextupole$, octupole$) - sliced_ele%rad_map%stale = .false. + if (associated(sliced_ele%rad_map)) sliced_ele%rad_map%stale = .false. end select endif