[Coverity] Prevent possible edge-case divide by zero error

This commit is contained in:
baldurk
2016-05-15 18:11:46 +02:00
parent 74d8f66359
commit b7472e4397
+3
View File
@@ -452,6 +452,9 @@ namespace renderdocui.Controls
}
}
if (maxval == 0)
maxval = 1;
for (int i = 0; i < HistogramData.Length; i++)
{
float x = (float)i / (float)HistogramData.Length;