Fixed r432 issue. (Issue 158)

This commit is contained in:
spx 2010-06-08 23:09:18 +00:00
parent 96ca019fc8
commit e0ea862d72

View File

@ -206,16 +206,29 @@ void CMeterHistogram::Initialize()
// Reset current position
m_MeterPos = 0;
// Delete buffers
if (m_PrimaryValues)
{
delete [] m_PrimaryValues;
m_PrimaryValues = NULL;
}
if (m_SecondaryValues)
{
delete [] m_SecondaryValues;
m_SecondaryValues = NULL;
}
// Create buffers for values
if (m_PrimaryValues) delete [] m_PrimaryValues;
if (m_W > 0)
{
m_PrimaryValues = new double[m_W];
memset(m_PrimaryValues, 0, sizeof(double) * m_W);
if (m_SecondaryMeasure)
{
if (m_SecondaryValues) delete [] m_SecondaryValues;
m_SecondaryValues = new double[m_W];
memset(m_SecondaryValues, 0, sizeof(double) * m_W);
}
}
m_WidthChanged = false;
}
@ -283,6 +296,10 @@ void CMeterHistogram::ReadConfig(const WCHAR* section)
}
}
}
else
{
m_WidthChanged = true;
}
}
/*