Skip to content

Commit c1bd2a9

Browse files
authored
Prevent DecodeToHitList from breaking when there is no config event handler (#528)
1 parent 93fed86 commit c1bd2a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/THcHitList.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata, Bool_t suppresswarni
321321
Int_t ref_fNSA = 0;
322322
Int_t ref_fNSB = 0;
323323
Int_t ref_fNPED = 0;
324-
if( fPSE125->IsPresent(theMap.crate) ) {
324+
if( fPSE125 && fPSE125->IsPresent(theMap.crate) ) {
325325
ref_fNSA = fPSE125->GetNSA(theMap.crate);
326326
ref_fNSB = fPSE125->GetNSB(theMap.crate);
327327
ref_fNPED = fPSE125->GetNPED(theMap.crate);
@@ -510,7 +510,7 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata, Bool_t suppresswarni
510510
}
511511
} else { // This is a Flash ADC
512512

513-
if( fPSE125->IsPresent(d->crate) ) {
513+
if( fPSE125 && fPSE125->IsPresent(d->crate) ) {
514514
if( !fHaveFADCInfo ) {
515515
fNSA = fPSE125->GetNSA(d->crate);
516516
fNSB = fPSE125->GetNSB(d->crate);

0 commit comments

Comments
 (0)