Skip to content

Commit

Permalink
FF: fix segfault when MD shared moorings not initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-platt committed Dec 23, 2024
1 parent 8d983ac commit ea8e9ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glue-codes/fast-farm/src/FAST_Farm_Subs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1841,7 +1841,7 @@ subroutine FARM_End(farm, ErrStat, ErrMsg)

!--------------
! 6. End farm-level MoorDyn
if (farm%p%MooringMod == 3) then
if (farm%p%MooringMod == 3 .and. allocated(farm%MD%Input)) then
call MD_End(farm%MD%Input(1), farm%MD%p, farm%MD%x, farm%MD%xd, farm%MD%z, farm%MD%OtherSt, farm%MD%y, farm%MD%m, ErrStat2, ErrMsg2)
call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
!TODO: any related items need to be cleared?
Expand Down

0 comments on commit ea8e9ca

Please sign in to comment.