Get QA object only upon successful opening of the QA.root
authorshahoian <ruben.shahoyan@cern.ch>
Wed, 24 Sep 2014 09:47:50 +0000 (11:47 +0200)
committershahoian <ruben.shahoyan@cern.ch>
Wed, 24 Sep 2014 09:47:58 +0000 (11:47 +0200)
STEER/STEER/AliQAv1.cxx

index 5a4457f..d9f94b2 100644 (file)
@@ -607,8 +607,7 @@ AliQAv1 * AliQAv1::Instance()
   // Get an instance of the singleton. The only authorized way to call the ctor
 
   if ( ! fgQA) {
-    GetQAResultFile() ; 
-    fgQA = static_cast<AliQAv1 *>(fgQAResultFile->Get("QA")) ; 
+    if (GetQAResultFile()) fgQA = static_cast<AliQAv1 *>(fgQAResultFile->Get("QA")) ; 
     if ( ! fgQA ) 
       fgQA = new AliQAv1() ;
   }