aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-04-06 18:16:07 +0200
committerThomas White <taw@physics.org>2010-04-06 18:16:07 +0200
commite0ba340416d809b7bf01e1a7bc07f7c1d560a13d (patch)
tree3e1a9144e09c7a9e8ec16eec5828efeccf9a9e9d /src
parent5118da14ff063fec23240b116b0fed15a07d5c67 (diff)
indexamajig: Fix error output if PDB can't be opened
Diffstat (limited to 'src')
-rw-r--r--src/indexamajig.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index f4733883..2ec01cce 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -521,11 +521,15 @@ int main(int argc, char *argv[])
free(indm_str);
cell = load_cell_from_pdb(pdb);
- free(pdb);
if ( cell == NULL ) {
- ERROR("Couldn't read unit cell (from molecule.pdb)\n");
+ if ( pdb == NULL ) {
+ ERROR("Couldn't read unit cell (from molecule.pdb)\n");
+ } else {
+ ERROR("Couldn't read unit cell (from %s)\n", pdb);
+ }
return 1;
}
+ free(pdb);
gsl_set_error_handler_off();
n_images = 0;