From 0f1e4a12922fd18709c24e5c261f5b97f0621e3e Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 23 Jul 2012 10:28:58 +0300 Subject: [PATCH] Histogram: Fixed crash due to to 4bbc372 --- Library/MeterHistogram.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/MeterHistogram.cpp b/Library/MeterHistogram.cpp index f35af563..1ae0ff2e 100644 --- a/Library/MeterHistogram.cpp +++ b/Library/MeterHistogram.cpp @@ -433,7 +433,7 @@ bool CMeterHistogram::Draw(Graphics& graphics) (m_Measures.size() >= 1 && !m_PrimaryValues) || (m_Measures.size() >= 2 && !m_SecondaryValues)) return false; - CMeasure* secondaryMeasure = m_Measures[1]; + CMeasure* secondaryMeasure = (m_Measures.size() >= 2) ? m_Measures[1] : NULL; GraphicsPath primaryPath; GraphicsPath secondaryPath;