diff options
author | Thomas White <taw@physics.org> | 2015-11-13 15:40:52 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2015-11-13 15:40:52 +0100 |
commit | 20ebfdbc1780a0d631ce9522291f82d4300b26d8 (patch) | |
tree | fdf7fd2dbceafb51c5b8cb56fd8d9f0e6d48b62f /src/geoptimiser.c | |
parent | c92244e212ea7c678ea6d070a0bc79f48bcbf6e2 (diff) |
Avoid NULL dereference in some scenarios when there is no bad pixel mask
Diffstat (limited to 'src/geoptimiser.c')
-rw-r--r-- | src/geoptimiser.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/geoptimiser.c b/src/geoptimiser.c index 4144bba2..dda53adc 100644 --- a/src/geoptimiser.c +++ b/src/geoptimiser.c @@ -2261,6 +2261,7 @@ static int save_data_to_png(char *filename, struct enhanced_det *edet, im.det = edet->det; im.width = edet->width; im.height = edet->height; + im.bad = NULL; im.dp = malloc(edet->det->n_panels*sizeof(float *)); if ( im.dp == NULL ) { ERROR("Failed to allocate data\n"); |