processing: no init for disabled processings

pull/1/head
Thorsten Liebig 2011-02-16 08:10:59 +01:00
parent 0bdd05fb3a
commit 9619df7ec0
1 changed files with 8 additions and 2 deletions

View File

@ -37,8 +37,12 @@ ProcessIntegral::~ProcessIntegral()
void ProcessIntegral::InitProcess() void ProcessIntegral::InitProcess()
{ {
delete[] m_Results; delete[] m_Results; m_Results = NULL;
delete[] m_FD_Results; delete[] m_FD_Results; m_FD_Results = NULL;
if (!Enabled)
return;
m_Results = new double[GetNumberOfIntegrals()]; m_Results = new double[GetNumberOfIntegrals()];
m_FD_Results = new vector<double_complex>[GetNumberOfIntegrals()]; m_FD_Results = new vector<double_complex>[GetNumberOfIntegrals()];
@ -75,6 +79,8 @@ void ProcessIntegral::InitProcess()
void ProcessIntegral::FlushData() void ProcessIntegral::FlushData()
{ {
if (!Enabled)
return;
if (m_FD_Samples.size()) if (m_FD_Samples.size())
Dump_FD_Data(1.0,m_filename + "_FD"); Dump_FD_Data(1.0,m_filename + "_FD");
} }