From 9619df7ec0dfd9da64b3554f54faa9d625c72e7f Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Wed, 16 Feb 2011 08:10:59 +0100 Subject: [PATCH] processing: no init for disabled processings --- Common/processintegral.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Common/processintegral.cpp b/Common/processintegral.cpp index 448e937..4d0c602 100644 --- a/Common/processintegral.cpp +++ b/Common/processintegral.cpp @@ -37,8 +37,12 @@ ProcessIntegral::~ProcessIntegral() void ProcessIntegral::InitProcess() { - delete[] m_Results; - delete[] m_FD_Results; + delete[] m_Results; m_Results = NULL; + delete[] m_FD_Results; m_FD_Results = NULL; + + if (!Enabled) + return; + m_Results = new double[GetNumberOfIntegrals()]; m_FD_Results = new vector[GetNumberOfIntegrals()]; @@ -75,6 +79,8 @@ void ProcessIntegral::InitProcess() void ProcessIntegral::FlushData() { + if (!Enabled) + return; if (m_FD_Samples.size()) Dump_FD_Data(1.0,m_filename + "_FD"); }