Skip to content

AFT-738: Protect against null pointer

Dan Guest requested to merge dguest-24.0-patch-07611 into 24.0

Fix for crash we get in derivations. I'm marking as urgent because it was breaking the ongoing PHYS production.

The original file was in DOS encoding, which gitlab helpfully corrected but which causes a mess of a diff unless you tell gitlab to ignore whitespace changes.

The only real change was adding

if (!pv) pv = pv_cont->front();

after the loop to find the primary vertex. As @jburzyns confirms below, there should always be some vertex in the vertex container, even if it's just a dummy.

I tested this on a file that @maklein provided (and that I put in a public space): with this change I don't get any seg fault. Without the change I do.

Edited by Dan Guest

Merge request reports

Loading