diff --git a/src/func.jl b/src/func.jl index 64d81d8e..841ac652 100644 --- a/src/func.jl +++ b/src/func.jl @@ -447,8 +447,8 @@ function Base.copy(L::FunctionOperator) L.op_inverse, L.op_adjoint_inverse, L.traits, - isdefined(L, :u) ? copy(L.u) : nothing, - isdefined(L, :p) ? deepcopy(L.p) : nothing, + isdefined(L, :u) && L.u !== nothing ? copy(L.u) : nothing, + isdefined(L, :p) && L.p !== nothing ? deepcopy(L.p) : nothing, L.t, L.cache === nothing ? nothing : deepcopy(L.cache), typeof(L).parameters[end-1], # iType diff --git a/src/interface.jl b/src/interface.jl index dfc7b839..a1599663 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -460,4 +460,5 @@ function LinearAlgebra.mul!(v::AbstractArray, end mul!(v, concretize(L), u, α, β) end + #