aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-07-28 13:21:42 +0200
committerThomas White <taw@physics.org>2023-07-28 13:21:42 +0200
commit22be2dbc3352dc13978fac5135ddb0141c9625e4 (patch)
tree273e566257f804ca88ce23c92e3860f70ea0f1db /libcrystfel
parentbd215c1b3ee2a509c37c5fb2b81191c02c45b4b0 (diff)
Allow detgeom_free(NULL)
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/detgeom.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcrystfel/src/detgeom.c b/libcrystfel/src/detgeom.c
index 122dcd87..58e52f01 100644
--- a/libcrystfel/src/detgeom.c
+++ b/libcrystfel/src/detgeom.c
@@ -65,6 +65,8 @@ void detgeom_free(struct detgeom *detgeom)
{
int i;
+ if ( detgeom == NULL ) return;
+
for ( i=0; i<detgeom->n_panels; i++ ) {
free(detgeom->panels[i].name);
}