mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed r432 issue. (Issue 158)
This commit is contained in:
parent
96ca019fc8
commit
e0ea862d72
@ -206,15 +206,28 @@ void CMeterHistogram::Initialize()
|
|||||||
// Reset current position
|
// Reset current position
|
||||||
m_MeterPos = 0;
|
m_MeterPos = 0;
|
||||||
|
|
||||||
// Create buffers for values
|
// Delete buffers
|
||||||
if (m_PrimaryValues) delete [] m_PrimaryValues;
|
if (m_PrimaryValues)
|
||||||
m_PrimaryValues = new double[m_W];
|
|
||||||
memset(m_PrimaryValues, 0, sizeof(double) * m_W);
|
|
||||||
if (m_SecondaryMeasure)
|
|
||||||
{
|
{
|
||||||
if (m_SecondaryValues) delete [] m_SecondaryValues;
|
delete [] m_PrimaryValues;
|
||||||
m_SecondaryValues = new double[m_W];
|
m_PrimaryValues = NULL;
|
||||||
memset(m_SecondaryValues, 0, sizeof(double) * m_W);
|
}
|
||||||
|
if (m_SecondaryValues)
|
||||||
|
{
|
||||||
|
delete [] m_SecondaryValues;
|
||||||
|
m_SecondaryValues = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create buffers for values
|
||||||
|
if (m_W > 0)
|
||||||
|
{
|
||||||
|
m_PrimaryValues = new double[m_W];
|
||||||
|
memset(m_PrimaryValues, 0, sizeof(double) * m_W);
|
||||||
|
if (m_SecondaryMeasure)
|
||||||
|
{
|
||||||
|
m_SecondaryValues = new double[m_W];
|
||||||
|
memset(m_SecondaryValues, 0, sizeof(double) * m_W);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_WidthChanged = false;
|
m_WidthChanged = false;
|
||||||
@ -283,6 +296,10 @@ void CMeterHistogram::ReadConfig(const WCHAR* section)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_WidthChanged = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user