aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-03-15 14:42:58 +0100
committerThomas White <taw@physics.org>2017-03-15 14:42:58 +0100
commit48f66a24733cca076b56ef5981f79ff690f7e39c (patch)
tree275170b77eb81d100d1b12ae4523191aa99f5321 /libcrystfel
parent8986433c649932c651b11719a31ba842f283fa2e (diff)
largest_q(): Handle NULL detector
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/detector.c5
1 files changed, 5 insertions, 0 deletions
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,