diff --git a/src/Model/GroundWaterFlow/gwf3lak8.f90 b/src/Model/GroundWaterFlow/gwf3lak8.f90 index 3c839ad81b0..fbaac89658d 100644 --- a/src/Model/GroundWaterFlow/gwf3lak8.f90 +++ b/src/Model/GroundWaterFlow/gwf3lak8.f90 @@ -4644,9 +4644,11 @@ subroutine lak_da(this) ! ! -- package csv table if (this%ipakcsv > 0) then - call this%pakcsvtab%table_da() - deallocate (this%pakcsvtab) - nullify (this%pakcsvtab) + if (associated(this%pakcsvtab)) then + call this%pakcsvtab%table_da() + deallocate (this%pakcsvtab) + nullify (this%pakcsvtab) + end if end if ! ! -- scalars diff --git a/src/Model/GroundWaterFlow/gwf3sfr8.f90 b/src/Model/GroundWaterFlow/gwf3sfr8.f90 index a7fcee06672..ab21074fbdf 100644 --- a/src/Model/GroundWaterFlow/gwf3sfr8.f90 +++ b/src/Model/GroundWaterFlow/gwf3sfr8.f90 @@ -2704,9 +2704,11 @@ subroutine sfr_da(this) ! ! -- deallocate package csv table if (this%ipakcsv > 0) then - call this%pakcsvtab%table_da() - deallocate (this%pakcsvtab) - nullify (this%pakcsvtab) + if (associated(this%pakcsvtab)) then + call this%pakcsvtab%table_da() + deallocate (this%pakcsvtab) + nullify (this%pakcsvtab) + end if end if ! ! -- deallocate scalars diff --git a/src/Model/GroundWaterFlow/gwf3uzf8.f90 b/src/Model/GroundWaterFlow/gwf3uzf8.f90 index 51204499414..3c1202787f9 100644 --- a/src/Model/GroundWaterFlow/gwf3uzf8.f90 +++ b/src/Model/GroundWaterFlow/gwf3uzf8.f90 @@ -2796,9 +2796,11 @@ subroutine uzf_da(this) ! ! -- package csv table if (this%ipakcsv > 0) then - call this%pakcsvtab%table_da() - deallocate (this%pakcsvtab) - nullify (this%pakcsvtab) + if (associated(this%pakcsvtab)) then + call this%pakcsvtab%table_da() + deallocate (this%pakcsvtab) + nullify (this%pakcsvtab) + end if end if ! ! -- deallocate scalars