From 277732601fbc188f666f9db732d01c5aa5127b48 Mon Sep 17 00:00:00 2001 From: schutz Date: Mon, 31 Mar 2008 09:01:19 +0000 Subject: [PATCH] added a protection --- STEER/AliQADataMaker.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/STEER/AliQADataMaker.cxx b/STEER/AliQADataMaker.cxx index 80295991569..38c880ef8af 100644 --- a/STEER/AliQADataMaker.cxx +++ b/STEER/AliQADataMaker.cxx @@ -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) -- 2.39.3