From 21b12a07fc1ee4f95527402630cd574925ab0131 Mon Sep 17 00:00:00 2001 From: Yaroslav Gevorkov Date: Wed, 13 Nov 2019 13:57:33 +0100 Subject: catch input error --- libcrystfel/src/pinkindexer.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libcrystfel/src/pinkindexer.c b/libcrystfel/src/pinkindexer.c index 8736e75d..1ab977ba 100644 --- a/libcrystfel/src/pinkindexer.c +++ b/libcrystfel/src/pinkindexer.c @@ -165,6 +165,11 @@ void *pinkIndexer_prepare(IndexingMethod *indm, UnitCell *cell, if ( (det->panels[0].clen_from != NULL) && pinkIndexer_opts->refinement_type == REFINEMENT_TYPE_firstFixedThenVariableLatticeParametersCenterAdjustmentMultiSeed) { ERROR("Using center refinement makes it necessary to have the detector distance fixed in the geometry file!"); + return NULL; + } + if(cell == NULL){ + ERROR("Pink indexer needs a unit cell file to be specified!") + return NULL; } struct pinkIndexer_private_data* pinkIndexer_private_data = malloc(sizeof(struct pinkIndexer_private_data)); -- cgit v1.2.3