Fixes Coverity CID 709286: Division or modulo by zero (DIVIDE_BY_ZERO)
Assigning: "maxVal" = "this->max()".
On this path, function call "this->max()" has return value of 0
78 int64_t maxVal = max();
...
Division by expression "maxVal" which may be zero has undefined behavior
86 val = m_correlationVector[x]/double(maxVal)*img.height();
QImage img(width, height, QImage::Format_ARGB32);
img.fill(qRgb(255,255,255));
QImage img(width, height, QImage::Format_ARGB32);
img.fill(qRgb(255,255,255));
+ if (maxVal == 0)
+ return img;
+
int val;
for (int x = 0; x < width; x++) {
int val;
for (int x = 0; x < width; x++) {