diff options
author | Thomas White <taw@physics.org> | 2017-03-03 11:45:03 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2017-03-03 11:46:04 +0100 |
commit | 9674c801f9eae6a807ecaf12b119aa3f6ee6fd77 (patch) | |
tree | 1036fe6d2e4cb8b89e74e5b8b797d36931762bed /src/partialator.c | |
parent | 81bbf308d43c5f74ce1e550eba1652a47b6d2841 (diff) |
partialator: Better handling of very small number of crystals
Diffstat (limited to 'src/partialator.c')
-rw-r--r-- | src/partialator.c | 6 |
1 files changed, 6 insertions, 0 deletions
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); |