aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-03-31 16:45:07 +0200
committerThomas White <taw@physics.org>2010-03-31 16:45:07 +0200
commitfe13ba95984f107a63df837dbbb946d194478d96 (patch)
treebc2eb15d92aa3f23ce94c45b5ead3a68fff828c7 /src
parent36101613181f24e22d435ce22b788fec96033977 (diff)
Catch failure to open PDB in load_cell_from_pdb()
Diffstat (limited to 'src')
-rw-r--r--src/cell.c4
1 files changed, 4 insertions, 0 deletions
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 {