From 9674c801f9eae6a807ecaf12b119aa3f6ee6fd77 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 3 Mar 2017 11:45:03 +0100 Subject: partialator: Better handling of very small number of crystals --- src/partialator.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/partialator.c') diff --git a/src/partialator.c b/src/partialator.c index 09feebb4..569145e8 100644 --- a/src/partialator.c +++ b/src/partialator.c @@ -191,6 +191,12 @@ static void write_split(Crystal **crystals, int n_crystals, const char *outfile, snprintf(tmp, 1024, "%s1", outfile); split = merge_intensities(crystals1, n_crystals1, nthreads, pmodel, min_measurements, push_res, 1); + + if ( split == NULL ) { + ERROR("Not enough crystals for two way split!\n"); + return; + } + STATUS("Writing two-way split to %s ", tmp); write_reflist_2(tmp, split, sym); reflist_free(split); -- cgit v1.2.3