Merge pull request #225 from wongcc966422/issue220
Fixes crash when opening file with Peak Controller
This commit is contained in:
@@ -48,6 +48,11 @@ public:
|
||||
return m_lastSample;
|
||||
}
|
||||
|
||||
PeakController * controller()
|
||||
{
|
||||
return m_autoController;
|
||||
}
|
||||
|
||||
int m_effectId;
|
||||
|
||||
private:
|
||||
@@ -57,7 +62,7 @@ private:
|
||||
float m_lastRMS;
|
||||
bool m_lastRMSavail;
|
||||
|
||||
Controller * m_autoController;
|
||||
PeakController * m_autoController;
|
||||
|
||||
friend class PeakControllerEffectControls;
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ PeakControllerEffectControls( PeakControllerEffect * _eff ) :
|
||||
|
||||
|
||||
|
||||
|
||||
void PeakControllerEffectControls::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
m_baseModel.loadSettings( _this, "base" );
|
||||
@@ -77,7 +78,7 @@ void PeakControllerEffectControls::loadSettings( const QDomElement & _this )
|
||||
m_effect->m_effectId = rand();
|
||||
}
|
||||
|
||||
if( m_effect->m_autoController && ( engine::getSong()->isLoadingProject() == true || PresetPreviewPlayHandle::isPreviewing() == false ) )
|
||||
if( m_effect->m_autoController && PresetPreviewPlayHandle::isPreviewing() == false )
|
||||
{
|
||||
delete m_effect->m_autoController;
|
||||
m_effect->m_autoController = 0;
|
||||
|
||||
Reference in New Issue
Block a user