From c75b2030b9c040c07c507f47822257879399e85d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 21 Feb 2024 11:13:19 +0100 Subject: Julia: RefList: Return nothing if no reflections in list --- julia/CrystFEL/src/reflists.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/julia/CrystFEL/src/reflists.jl b/julia/CrystFEL/src/reflists.jl index 901162e8..d922bdae 100644 --- a/julia/CrystFEL/src/reflists.jl +++ b/julia/CrystFEL/src/reflists.jl @@ -55,7 +55,7 @@ function Base.iterate(reflist::RefList{T}) where T reflist.internalptr, rli) if refl == C_NULL - throw(ArgumentError("Failed to find first reflection in list")) + return nothing # no reflections! end iter = RefListIterator(refl,rli[]) -- cgit v1.2.3