Index: trunk/MagicSoft/Mars/mhcalib/MHGausEvents.cc
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHGausEvents.cc	(revision 5114)
+++ trunk/MagicSoft/Mars/mhcalib/MHGausEvents.cc	(revision 5115)
@@ -176,4 +176,13 @@
   if (fHPowerProbability)
     delete fHPowerProbability;
+
+  //
+  // The next two lines are important for the case that 
+  // the class has been stored to a file and is read again. 
+  // In this case, the next two lines prevent a segm. violation
+  // in the destructor
+  //
+  gROOT->GetListOfFunctions()->Remove(fFGausFit);
+  gROOT->GetListOfFunctions()->Remove(fFExpFit);
   
   // delete fits
@@ -673,4 +682,5 @@
   //
   gROOT->GetListOfFunctions()->Remove(fFGausFit);
+
   fFGausFit->SetParameters(area_guess,mu_guess,sigma_guess);
   fFGausFit->SetParNames("Area","#mu","#sigma");
@@ -681,5 +691,4 @@
 
   fHGausHist.Fit(fFGausFit,option);
-
 
   fMean     = fFGausFit->GetParameter(1);
