segmentation fault in cause of empty list

This commit is contained in:
Martin Diehl 2018-08-29 08:26:28 +02:00
parent 94695f773e
commit 680c9e11d4
1 changed files with 3 additions and 3 deletions

View File

@ -351,7 +351,7 @@ end subroutine finalize
!--------------------------------------------------------------------------------------------------
!> @brief cleans entire array of linke lists
!> @details called when variable goes out of scope.
!> @details called when variable goes out of scope and deallocates the list at each array entry
!--------------------------------------------------------------------------------------------------
subroutine finalizeArray(this)
@ -361,11 +361,11 @@ subroutine finalizeArray(this)
type(tPartitionedStringList), pointer :: temp ! bug in Gfortran?
do i=1, size(this)
!if (associated(this(i)%next)) then
if (associated(this(i)%next)) then
temp => this(i)%next
!deallocate(this(i)) !internal compiler error: in gfc_build_final_call, at fortran/trans.c:975
deallocate(temp)
!endif
endif
enddo
end subroutine finalizeArray