aboutsummaryrefslogtreecommitdiff
path: root/src/GRHydro_ENOReconstruct.F90
diff options
context:
space:
mode:
Diffstat (limited to 'src/GRHydro_ENOReconstruct.F90')
-rw-r--r--src/GRHydro_ENOReconstruct.F907
1 files changed, 5 insertions, 2 deletions
diff --git a/src/GRHydro_ENOReconstruct.F90 b/src/GRHydro_ENOReconstruct.F90
index a4a9e10..904181e 100644
--- a/src/GRHydro_ENOReconstruct.F90
+++ b/src/GRHydro_ENOReconstruct.F90
@@ -128,8 +128,11 @@ subroutine GRHydro_ENOShutdown(CCTK_ARGUMENTS)
CCTK_INT :: deallocstat
- deallocate(eno_coeffs, STAT = deallocstat)
- if (deallocstat .ne. 0) call CCTK_WARN(0, "Failed to deallocate ENO coefficients.")
+ if(coeffs_allocated) then
+ deallocate(eno_coeffs, STAT = deallocstat)
+ if (deallocstat .ne. 0) call CCTK_WARN(0, "Failed to deallocate ENO coefficients.")
+ coeffs_allocated = .false.
+ endif
end subroutine GRHydro_ENOShutdown