Skip to content

Commit 8528779

Browse files
will-cerndpiparo
authored andcommitted
[RF] Protect RooSimultaneous against missing pdf for current state
A user encountered a nasty crash when evaluating a pdf that didn't have the current state pdf defined for it. Should just return 0, not crash out!
1 parent 4ce1be0 commit 8528779

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

roofit/roofitcore/src/RooSimultaneous.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,9 @@ double RooSimultaneous::evaluate() const
447447
{
448448
// Retrieve the proxy by index name
449449
RooRealProxy *proxy = static_cast<RooRealProxy *>(_pdfProxyList.FindObject(_indexCat.label()));
450+
if(!proxy) {
451+
return 0;
452+
}
450453

451454
double nEvtTot = 1.0;
452455
double nEvtCat = 1.0;

0 commit comments

Comments
 (0)