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/hdfsee-render.c | |
parent | c92244e212ea7c678ea6d070a0bc79f48bcbf6e2 (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.c | 3 |
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; } } |