Skip to content

Commit

Permalink
Fixes #756: add judgement of macros allocation status (#762)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoziha authored Sep 29, 2022
1 parent 1a8a96b commit 4fb72da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fpm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ subroutine build_model(model, settings, package, error)

if (allocated(dependency%preprocess)) then
do j = 1, size(dependency%preprocess)
if (package%preprocess(j)%name == "cpp") then
if (package%preprocess(j)%name == "cpp" .and. allocated(dependency%preprocess(j)%macros)) then
model%packages(i)%macros = dependency%preprocess(j)%macros
end if
end do
Expand Down

0 comments on commit 4fb72da

Please sign in to comment.