diff --git a/src/swiftest/swiftest_util.f90 b/src/swiftest/swiftest_util.f90 index 5e271605c..cc1b9e398 100644 --- a/src/swiftest/swiftest_util.f90 +++ b/src/swiftest/swiftest_util.f90 @@ -1850,6 +1850,8 @@ module subroutine swiftest_util_rearray_pl(self, nbody_system, param) npl = pl%nbody end if + if (npl == 0) return + ! Reset all of the status flags for this body pl%status(1:npl) = ACTIVE do i = 1, npl