]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added a protection
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 31 Mar 2008 09:01:19 +0000 (09:01 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 31 Mar 2008 09:01:19 +0000 (09:01 +0000)
STEER/AliQADataMaker.cxx

index 80295991569a3648bb1004df77659228b3ac8135..38c880ef8af0f5079dea3875158b4d1c20d86a22 100644 (file)
@@ -110,13 +110,18 @@ void AliQADataMaker::Finish() const
 TObject * AliQADataMaker::GetData(TObjArray * list, const Int_t index)  
 { 
        // Returns the QA object at index. Limit is 100. 
-       if ( index > 10000 ) {
-               AliError("Max number of authorized QA objects is 10000") ; 
-               return NULL; 
+       if (list) {
+               if ( index > 10000 ) {
+                       AliError("Max number of authorized QA objects is 10000") ; 
+                       return NULL ; 
+               } else {
+                       return list->At(index) ; 
+               }       
        } else {
-               return list->At(index) ; 
+               AliError("Data list is NULL !!") ; 
+               return NULL ;           
        }
-} 
+}
 
 //____________________________________________________________________________
 void AliQADataMaker::Reset(const Bool_t sameCycle)