From 35028ce34d3e31f23873730cd55e01b36b2cc1e2 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 24 Apr 2024 16:24:55 +0200 Subject: Julia: Avoid making a list of Nothing The type of the list needs to be correct, otherwise we can't push to it later. --- julia/CrystFEL/src/image.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/julia/CrystFEL/src/image.jl b/julia/CrystFEL/src/image.jl index 4090dc61..5ce056bd 100644 --- a/julia/CrystFEL/src/image.jl +++ b/julia/CrystFEL/src/image.jl @@ -55,7 +55,7 @@ mutable struct Image internalptr::Ptr{InternalImage} peaklist::Union{Nothing,PeakList} crystals - reflists + reflists::Vector{Union{Nothing,RefList}} end @@ -99,7 +99,7 @@ function makecrystallist(image, listptr, n) end image.crystals = map(x->x.crystal, crystals) - image.reflists = map(x->x.reflections, crystals) + image.reflists = Vector{Union{Nothing,RefList}}(map(x->x.reflections, crystals)) return crystals end -- cgit v1.2.3