aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/detgeom.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-07-26 16:23:17 +0200
committerThomas White <taw@physics.org>2023-07-28 13:22:05 +0200
commit9677bc525b41a133ca611b60a383dab58b0ea5f9 (patch)
treecfaf51924ba0ab39bc046812b2b96f620cfa86e1 /libcrystfel/src/detgeom.c
parent975ed3e8b0d44d053dda10bfc6a20389a31bbbd4 (diff)
Initialise det->top_group
Diffstat (limited to 'libcrystfel/src/detgeom.c')
-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 3516d996..b4835317 100644
--- a/libcrystfel/src/detgeom.c
+++ b/libcrystfel/src/detgeom.c
@@ -68,6 +68,8 @@ static void free_group(struct detgeom_panel_group *g)
{
int i;
+ if ( g == NULL ) return;
+
for ( i=0; i<g->n_children; i++ ) {
free_group(g->children[i]);
}