aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-03-06 21:33:44 +0100
committerThomas White <taw@physics.org>2014-03-06 21:33:44 +0100
commit6563d65f5efd836c7152c0ab75ea9a3afa995879 (patch)
tree67ebc239441683b9d123b6ea3876c10ded195ca8
parent788ceb929968341e714f11d980944d9ff42ffd8e (diff)
Fix segfault
-rw-r--r--src/ambigator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ambigator.c b/src/ambigator.c
index 5f7f921b..028ed4bb 100644
--- a/src/ambigator.c
+++ b/src/ambigator.c
@@ -467,7 +467,7 @@ static void detwin(struct cc_list *ccs, int n_crystals, int *assignments,
f /= p;
g /= q;
- fprintf(fh, "%5.3f %5.3f\n", f, g);
+ if ( fh != NULL ) fprintf(fh, "%5.3f %5.3f\n", f, g);
mf += f;
nmf++;