Index: trunk/MagicSoft/Mars/mhcalib/MHGausEvents.cc
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHGausEvents.cc	(revision 8001)
+++ trunk/MagicSoft/Mars/mhcalib/MHGausEvents.cc	(revision 8013)
@@ -754,19 +754,21 @@
   fSigmaErr = fFGausFit->GetParError(2);
   fProb     = fFGausFit->GetProb();
+
   //
   // The fit result is accepted under condition:
-  // 1) The results are not nan's
-  // 2) The NDF is not smaller than fNDFLimit (default: fgNDFLimit)
-  // 3) The Probability is greater than fProbLimit (default: fgProbLimit)
-  //
-  if (   TMath::IsNaN(fMean) 
-      || TMath::IsNaN(fMeanErr)
-      || TMath::IsNaN(fProb)    
-      || TMath::IsNaN(fSigma)
-      || TMath::IsNaN(fSigmaErr) 
+  // 1) The results are not NaN's  (not a number)
+  // 2) The results are all finite
+  // 3) The NDF is not smaller than fNDFLimit (default: fgNDFLimit)
+  // 4) The Probability is greater than fProbLimit (default: fgProbLimit)
+  //
+  if (   TMath::IsNaN(fMean)        || !TMath::Finite(fMean)
+      || TMath::IsNaN(fMeanErr)     || !TMath::Finite(fMeanErr)
+      || TMath::IsNaN(fProb)        || !TMath::Finite(fProb)
+      || TMath::IsNaN(fSigma)       || !TMath::Finite(fSigma)
+      || TMath::IsNaN(fSigmaErr)    || !TMath::Finite(fSigmaErr)
       || fFGausFit->GetNDF() < fNDFLimit 
       || fProb < fProbLimit )
     return kFALSE;
-  
+
   SetGausFitOK(kTRUE);
   return kTRUE;
