Fix some memory access issues
This commit is contained in:
@@ -867,7 +867,7 @@ void AutomationPattern::generateTangents()
|
||||
void AutomationPattern::generateTangents( timeMap::const_iterator it,
|
||||
int numToGenerate )
|
||||
{
|
||||
if( m_timeMap.size() < 2 )
|
||||
if( m_timeMap.size() < 2 && numToGenerate > 0 )
|
||||
{
|
||||
m_tangents[it.key()] = 0;
|
||||
return;
|
||||
|
||||
@@ -446,14 +446,14 @@ void EnvelopeAndLfoParameters::updateSampleVars()
|
||||
{
|
||||
sample_t * tmp = m_pahdEnv;
|
||||
m_pahdEnv = new sample_t[m_pahdFrames];
|
||||
delete tmp;
|
||||
delete[] tmp;
|
||||
m_pahdBufSize = m_pahdFrames;
|
||||
}
|
||||
if( m_rBufSize < m_rFrames )
|
||||
{
|
||||
sample_t * tmp = m_rEnv;
|
||||
m_rEnv = new sample_t[m_rFrames];
|
||||
delete tmp;
|
||||
delete[] tmp;
|
||||
m_rBufSize = m_rFrames;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user