aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/reax.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-02-09 22:16:25 -0800
committerThomas White <taw@physics.org>2013-02-09 22:16:25 -0800
commit00d4c6ce684b1352d585a287f8ef31c1c30a7c35 (patch)
tree90a8442ff28aa1a64e9840043ee7b72faa6081da /libcrystfel/src/reax.c
parent11fe97d53a627fd5caf067bd9fe8f967cf3a72df (diff)
Complain if a unit cell is needed and not provided
Diffstat (limited to 'libcrystfel/src/reax.c')
-rw-r--r--libcrystfel/src/reax.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libcrystfel/src/reax.c b/libcrystfel/src/reax.c
index 4717dcb4..f454503c 100644
--- a/libcrystfel/src/reax.c
+++ b/libcrystfel/src/reax.c
@@ -3,11 +3,11 @@
*
* A new auto-indexer
*
- * Copyright © 2012 Deutsches Elektronen-Synchrotron DESY,
- * a research centre of the Helmholtz Association.
+ * Copyright © 2012-2013 Deutsches Elektronen-Synchrotron DESY,
+ * a research centre of the Helmholtz Association.
*
* Authors:
- * 2011-2012 Thomas White <taw@physics.org>
+ * 2011-2013 Thomas White <taw@physics.org>
*
* This file is part of CrystFEL.
*
@@ -1092,6 +1092,11 @@ IndexingPrivate *reax_prepare(IndexingMethod indm, UnitCell *cell,
int samp;
double th;
+ if ( cell == NULL ) {
+ ERROR("ReAx needs a unit cell.\n");
+ return NULL;
+ }
+
p = calloc(1, sizeof(*p));
if ( p == NULL ) return NULL;