]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added a protection needed in the case the getter is created without a file (cas of...
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Jun 2002 08:24:15 +0000 (08:24 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Jun 2002 08:24:15 +0000 (08:24 +0000)
PHOS/AliPHOSGetter.cxx

index 3ad277516f0c597fd906d7ec862e40e560a566f2..b144bff00d8102c8592e2d5d83df38abbf89f0a8 100644 (file)
@@ -194,6 +194,9 @@ AliPHOSGetter * AliPHOSGetter::GetInstance(const char* headerFile,
   // Creates and returns the pointer of the unique instance
   // Must be called only when the environment has changed 
 
+  if ( fgObjGetter && !fFile) // an instance exists and getter was called without a file (case of merging) 
+    return fgObjGetter ;
+
   if ( fgObjGetter && fFile->IsOpen()) // an instance exists and the file is still open   
     if((fgObjGetter->fBranchTitle.CompareTo(branchTitle) == 0) && 
        (fgObjGetter->fHeaderFile.CompareTo(headerFile)==0)) {