Commit d3323047 authored by Thomas White's avatar Thomas White
Browse files

indexamajig: Don't load unit cell if none given

This fixes some incorrect behaviour introduced by c7712c20.
parent f8e58b42
......@@ -449,10 +449,6 @@ int main(int argc, char *argv[])
}
free(speaks);
if ( pdb == NULL ) {
pdb = strdup("molecule.pdb");
}
if ( prefix == NULL ) {
prefix = strdup("");
} else {
......@@ -550,13 +546,18 @@ int main(int argc, char *argv[])
}
free(geometry);
cell = load_cell_from_pdb(pdb);
if ( cell == NULL ) {
ERROR("Couldn't read unit cell (from %s)\n", pdb);
return 1;
if ( pdb != NULL ) {
cell = load_cell_from_pdb(pdb);
if ( cell == NULL ) {
ERROR("Couldn't read unit cell (from %s)\n", pdb);
return 1;
}
free(pdb);
cell_print(cell);
} else {
STATUS("No unit cell given.\n");
cell = NULL;
}
free(pdb);
cell_print(cell);
write_stream_header(ofh, argc, argv);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment