From fe13ba95984f107a63df837dbbb946d194478d96 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 31 Mar 2010 16:45:07 +0200 Subject: Catch failure to open PDB in load_cell_from_pdb() --- src/cell.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cell.c b/src/cell.c index 42f34dfa..e7064002 100644 --- a/src/cell.c +++ b/src/cell.c @@ -624,6 +624,10 @@ UnitCell *load_cell_from_pdb(const char *filename) UnitCell *cell = NULL; fh = fopen(filename, "r"); + if ( fh == NULL ) { + ERROR("Couldn't open '%s'\n", filename); + return NULL; + } do { -- cgit v1.2.3