Commit 3e194359 authored by Sven Strickroth's avatar Sven Strickroth

Prevent possible division by zero

Signed-off-by: Sven Strickroth's avatarSven Strickroth <email@cs-ware.de>
parent 674125e1
......@@ -857,7 +857,7 @@ void MyGraph::DrawLegend(CDC& dc)
// Get the height of each label.
LOGFONT lf = { 0 };
VERIFY(fontLegend.GetLogFont(&lf));
int nLabelHeight(abs(lf.lfHeight));
int nLabelHeight = min(1, abs(lf.lfHeight));
// Get number of legend entries
int nLegendEntries = max(1, GetMaxSeriesSize());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment