From 48f66a24733cca076b56ef5981f79ff690f7e39c Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 15 Mar 2017 14:42:58 +0100 Subject: largest_q(): Handle NULL detector --- libcrystfel/src/detector.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libcrystfel') diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c index 90dbe535..52e4c330 100644 --- a/libcrystfel/src/detector.c +++ b/libcrystfel/src/detector.c @@ -2002,6 +2002,11 @@ double largest_q(struct image *image) struct rvec q; double tt; + if ( image->det == NULL ) { + ERROR("No detector geometry. assuming detector is infinite!\n"); + return INFINITY; + } + q = get_q_for_panel(image->det->furthest_out_panel, image->det->furthest_out_fs, image->det->furthest_out_ss, -- cgit v1.2.3