diff --git a/src/rmvs/rmvs_setup.f90 b/src/rmvs/rmvs_setup.f90 index d3beeb2f8..a95fe83f6 100644 --- a/src/rmvs/rmvs_setup.f90 +++ b/src/rmvs/rmvs_setup.f90 @@ -141,11 +141,7 @@ module subroutine rmvs_setup_tp(self, n, param) !> Call allocation method for parent class. In this case, whm does not have its own setup method, so we use the base method for swiftest_tp call setup_tp(self, n, param) - if (n < 0) return - - call self%dealloc() - - if (n == 0) return + if (n <= 0) return allocate(self%lperi(n)) allocate(self%plperP(n)) diff --git a/src/symba/symba_setup.f90 b/src/symba/symba_setup.f90 index cda5214d0..4a1ca9498 100644 --- a/src/symba/symba_setup.f90 +++ b/src/symba/symba_setup.f90 @@ -112,11 +112,7 @@ module subroutine symba_setup_encounter_list(self, n) integer(I8B), intent(in) :: n !! Number of encounters to allocate space for call encounter_setup_list(self, n) - if (n < 0_I8B) return - - call self%dealloc() - - if (n ==0_I8B) return + if (n <= 0_I8B) return allocate(self%level(n))