aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/detector.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/detector.c b/src/detector.c
index 4d60f66e..5c1db570 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -782,7 +782,11 @@ struct detector *copy_geom(const struct detector *in)
out = malloc(sizeof(struct detector));
memcpy(out, in, sizeof(struct detector));
- out->mask = strdup(in->mask);
+ if ( in->mask != NULL ) {
+ out->mask = strdup(in->mask);
+ } else {
+ out->mask = NULL; /* = in->mask */
+ }
out->panels = malloc(out->n_panels * sizeof(struct panel));
memcpy(out->panels, in->panels, out->n_panels * sizeof(struct panel));