Skip to content

Commit 624a9f9

Browse files
oh betty
1 parent 55a8d67 commit 624a9f9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/OrdinaryDiffEqCore/src/integrators/integrator_interface.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ function resize!(integrator::ODEIntegrator, i::Int)
221221
# may be required for things like units
222222
c !== nothing && resize!(c, i)
223223
end
224-
resize!(integrator.fsalfirst, i)
225-
resize!(integrator.fsallast, i)
224+
!isnothing(integrator.fsalfirst) && resize!(integrator.fsalfirst, i)
225+
!isnothing(integrator.fsallast) && resize!(integrator.fsallast, i)
226226
resize_f!(integrator.f, i)
227227
resize_nlsolver!(integrator, i)
228228
resize_J_W!(cache, integrator, i)
@@ -235,8 +235,8 @@ function resize!(integrator::ODEIntegrator, i::NTuple{N, Int}) where {N}
235235
for c in full_cache(cache)
236236
resize!(c, i)
237237
end
238-
resize!(integrator.fsalfirst, i)
239-
resize!(integrator.fsallast, i)
238+
!isnothing(integrator.fsalfirst) && resize!(integrator.fsalfirst, i)
239+
!isnothing(integrator.fsallast) && resize!(integrator.fsallast, i)
240240
resize_f!(integrator.f, i)
241241
# TODO the parts below need to be adapted for implicit methods
242242
isdefined(integrator.cache, :nlsolver) && resize_nlsolver!(integrator, i)

0 commit comments

Comments
 (0)