Skip to content

Commit 4fb72da

Browse files
authored
Fixes #756: add judgement of macros allocation status (#762)
1 parent 1a8a96b commit 4fb72da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fpm.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ subroutine build_model(model, settings, package, error)
115115

116116
if (allocated(dependency%preprocess)) then
117117
do j = 1, size(dependency%preprocess)
118-
if (package%preprocess(j)%name == "cpp") then
118+
if (package%preprocess(j)%name == "cpp" .and. allocated(dependency%preprocess(j)%macros)) then
119119
model%packages(i)%macros = dependency%preprocess(j)%macros
120120
end if
121121
end do

0 commit comments

Comments
 (0)