aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-08-05 12:03:11 +0200
committerThomas White <taw@physics.org>2012-02-22 15:26:55 +0100
commit4399271bb9841080be59870c10f8d39d877eebb5 (patch)
tree81baeb2d17d86e02e36886fd65983f2c5329354d
parentdc948a171f57bc7131415b511a443f7840746bfd (diff)
indexamajig: Don't even try to load the cell if it's not needed
-rw-r--r--src/indexamajig.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 829f29be..dd1c81fc 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -615,15 +615,15 @@ int main(int argc, char *argv[])
}
free(geometry);
- cell = load_cell_from_pdb(pdb);
- if ( cell == NULL ) {
- if ( config_nomatch ) {
- STATUS("Couldn't read unit cell, but no matching is"
- " requested, so that's OK.\n");
- } else {
+ if ( !config_nomatch ) {
+ cell = load_cell_from_pdb(pdb);
+ if ( cell == NULL ) {
ERROR("Couldn't read unit cell (from %s)\n", pdb);
return 1;
}
+ } else {
+ STATUS("No cell needed because --no-match was used.\n");
+ cell = NULL;
}
free(pdb);