diff --git a/src/FEQParse_TokenStack.F90 b/src/FEQParse_TokenStack.F90 index c9b4b10..3d43fd0 100644 --- a/src/FEQParse_TokenStack.F90 +++ b/src/FEQParse_TokenStack.F90 @@ -50,7 +50,7 @@ subroutine Construct_TokenStack(stack,N) subroutine Finalize_TokenStack(stack) class(TokenStack),intent(inout) :: stack - deallocate(stack%tokens) + if(allocated(stack%tokens)) deallocate(stack%tokens) endsubroutine Finalize_TokenStack