diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/process_hkl.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/process_hkl.c b/src/process_hkl.c index f5e705bd..f2fba11c 100644 --- a/src/process_hkl.c +++ b/src/process_hkl.c @@ -468,12 +468,16 @@ int main(int argc, char *argv[]) output = strdup("processed.hkl"); } - cell = load_cell_from_pdb(pdb); - if ( cell == NULL ) { - ERROR("Failed to load cell from '%s'\n", pdb); - return 1; + if ( pdb != NULL ) { + cell = load_cell_from_pdb(pdb); + if ( cell == NULL ) { + ERROR("Failed to load cell from '%s'\n", pdb); + return 1; + } + free(pdb); + } else { + cell = NULL; } - free(pdb); if ( sym == NULL ) sym = strdup("1"); |