diff options
author | Thomas White <taw@physics.org> | 2023-07-28 13:21:42 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2023-07-28 13:21:42 +0200 |
commit | 22be2dbc3352dc13978fac5135ddb0141c9625e4 (patch) | |
tree | 273e566257f804ca88ce23c92e3860f70ea0f1db /libcrystfel/src | |
parent | bd215c1b3ee2a509c37c5fb2b81191c02c45b4b0 (diff) |
Allow detgeom_free(NULL)
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/detgeom.c | 2 |
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); } |