From e0ba340416d809b7bf01e1a7bc07f7c1d560a13d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 6 Apr 2010 18:16:07 +0200 Subject: indexamajig: Fix error output if PDB can't be opened --- src/indexamajig.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3