diff options
author | LKedward <laurence.kedward@bristol.ac.uk> | 2020-08-26 15:50:11 +0100 |
---|---|---|
committer | LKedward <laurence.kedward@bristol.ac.uk> | 2020-08-26 15:50:11 +0100 |
commit | 434033f6e873912993c2bf6b7bb6878b5e8f4a23 (patch) | |
tree | c2b5bac71ecc020604bbdd44e25229e6b22348b6 | |
parent | d44bb2e4e3312f7d533b9f9123893f330cefdc45 (diff) | |
download | fpm-434033f6e873912993c2bf6b7bb6878b5e8f4a23.tar.gz fpm-434033f6e873912993c2bf6b7bb6878b5e8f4a23.zip |
Minor fix: add dependency pointer guard.
-rw-r--r-- | fpm/src/FPM_Backend.f90 | 4 | ||||
-rw-r--r-- | fpm/src/FPM_Sourcefiles.f90 | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/fpm/src/FPM_Backend.f90 b/fpm/src/FPM_Backend.f90 index f52efb3..d0aaa19 100644 --- a/fpm/src/FPM_Backend.f90 +++ b/fpm/src/FPM_Backend.f90 @@ -30,7 +30,9 @@ recursive subroutine build_source(source_file,linking) do i=1,size(source_file%file_dependencies) - call build_source(source_file%file_dependencies(i)%ptr,linking) + if (associated(source_file%file_dependencies(i)%ptr)) then + call build_source(source_file%file_dependencies(i)%ptr,linking) + end if end do diff --git a/fpm/src/FPM_Sourcefiles.f90 b/fpm/src/FPM_Sourcefiles.f90 index 33c0de2..b613423 100644 --- a/fpm/src/FPM_Sourcefiles.f90 +++ b/fpm/src/FPM_Sourcefiles.f90 @@ -348,6 +348,8 @@ subroutine resolve_dependencies(sources) do j=1,n_depend + sources(i)%file_dependencies(j)%ptr => NULL() + do k=1,size(sources) if (sources(i)%module_dependencies(j)%s == sources(k)%unit_name) then |