aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-07-02 16:41:52 +0200
committerThomas White <taw@physics.org>2020-07-29 18:53:44 +0200
commit7a1043dc12309e7bc5fcaa3594033341a67185e0 (patch)
treeeb40b62270db633745493429306a98fc5e9b8f13
parent7476427420727c4b54ec97e26490e63137c33a74 (diff)
data_template_free: Allow NULL
-rw-r--r--libcrystfel/src/datatemplate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcrystfel/src/datatemplate.c b/libcrystfel/src/datatemplate.c
index efe2ad28..ecd12439 100644
--- a/libcrystfel/src/datatemplate.c
+++ b/libcrystfel/src/datatemplate.c
@@ -1158,6 +1158,8 @@ void data_template_free(DataTemplate *dt)
{
int i;
+ if ( dt == NULL ) return;
+
free_all_rigid_groups(dt);
free_all_rigid_group_collections(dt);