aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-08-31 17:37:42 +0200
committerThomas White <taw@physics.org>2020-08-31 17:37:42 +0200
commit85d85beda8d746aaf9f86303be5f0c9feff8e425 (patch)
tree18f5520723de5f68644476e5313597058e356aca /src
parentcbb0d6f17a45cf9f07aab8d007fb73709d14d74f (diff)
Only write unit cell file to project file if it's set
Diffstat (limited to 'src')
-rw-r--r--src/gui_project.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui_project.c b/src/gui_project.c
index d7a1cbd1..a641eee5 100644
--- a/src/gui_project.c
+++ b/src/gui_project.c
@@ -475,8 +475,11 @@ int save_project(struct crystfelproject *proj)
fprintf(fh, "peak_search_params.revalidate %i\n",
proj->peak_search_params.revalidate);
- fprintf(fh, "indexing.cell_file %s\n",
- proj->indexing_params.cell_file);
+ if ( proj->indexing_params.cell_file != NULL ) {
+ fprintf(fh, "indexing.cell_file %s\n",
+ proj->indexing_params.cell_file);
+ }
+
fprintf(fh, "indexing.methods %s\n",
proj->indexing_params.indexing_methods);
fprintf(fh, "indexing.multi_lattice %i\n",