aboutsummaryrefslogtreecommitdiff
path: root/src/hdfsee-render.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-11-13 15:40:52 +0100
committerThomas White <taw@physics.org>2015-11-13 15:40:52 +0100
commit20ebfdbc1780a0d631ce9522291f82d4300b26d8 (patch)
treefdf7fd2dbceafb51c5b8cb56fd8d9f0e6d48b62f /src/hdfsee-render.c
parentc92244e212ea7c678ea6d070a0bc79f48bcbf6e2 (diff)
Avoid NULL dereference in some scenarios when there is no bad pixel mask
Diffstat (limited to 'src/hdfsee-render.c')
-rw-r--r--src/hdfsee-render.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hdfsee-render.c b/src/hdfsee-render.c
index a64832a0..358847a4 100644
--- a/src/hdfsee-render.c
+++ b/src/hdfsee-render.c
@@ -88,7 +88,8 @@ static float *get_binned_panel(struct image *image, int binning,
v = image->dp[pi][fs+ss*fw];
total += v;
- if ( image->bad[pi][fs+ss*fw] ) bad = 1;
+ if ( (image->bad != NULL)
+ && (image->bad[pi][fs+ss*fw]) ) bad = 1;
}
}