Bugs soved by Peter Hristov.
[u/mrichter/AliRoot.git] / HMPID / AliHMPIDParam.h
index f5fff4a..0b7bb8b 100644 (file)
@@ -19,8 +19,15 @@ class AliHMPIDParam :public TNamed
 {
 public:
 //ctor&dtor    
-  virtual        ~AliHMPIDParam()                                    {for(Int_t i=0;i<7;i++) delete fM[i]; delete fgInstance; fgInstance=0;}
-         void     Print(Option_t *opt="") const;                                         //print current parametrization
+  virtual        ~AliHMPIDParam() {
+    if (fgInstance){
+      for(Int_t i=0;i<7;i++){ delete fM[i]; fM[i] = 0x0;}
+      fgInstance=0;
+    }
+  }
+  
+  void     Print(Option_t *opt="") const;                                         //print current parametrization
+         
   static inline AliHMPIDParam* Instance();                                //pointer to AliHMPIDParam singleton
   static inline AliHMPIDParam* InstanceNoGeo();                           //pointer to AliHMPIDParam singleton without geometry.root for MOOD, displays, ...
 //geo info