aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/detgeom.c
diff options
context:
space:
mode:
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]);
}