Fix two issues reported by coverity

This commit is contained in:
heckflosse
2018-11-16 14:50:51 +01:00
parent 152b42125a
commit 94f4afeb6b
2 changed files with 1 additions and 1 deletions

View File

@@ -183,6 +183,7 @@ float estimate_ambient_light(const array2D<float> &R, const array2D<float> &G, c
}
}
}
n = std::max(n, 1);
ambient[0] = rr / n;
ambient[1] = gg / n;
ambient[2] = bb / n;