Skip to content

Commit b09a5b2

Browse files
committed
fix possible deref of nullptr error message
1 parent 3a57811 commit b09a5b2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

PWGCF/GenericFramework/Core/FlowContainer.cxx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -916,8 +916,12 @@ TProfile* FlowContainer::GetRefFlowProfile(const char* order, double m1, double
916916
delete tempprof;
917917
}
918918
delete rhSubset;
919-
retpf->RebinX(nBins);
920-
return retpf;
919+
if (retpf) {
920+
retpf->RebinX(nBins);
921+
return retpf;
922+
} else {
923+
return nullptr;
924+
}
921925
};
922926

923927
//{2} particle correlations

0 commit comments

Comments
 (0)