Skip to content

Commit

Permalink
Merge pull request #40086 from swagata87/125X_GsfSmoother
Browse files Browse the repository at this point in the history
[125X] Improve unprotected areas of GSF code to avoid segfault
  • Loading branch information
cmsbuild authored Nov 17, 2022
2 parents 3f6d8f9 + 3737b55 commit 2e1911f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions TrackingTools/GsfTracking/src/GsfTrajectorySmoother.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ Trajectory GsfTrajectorySmoother::trajectory(const Trajectory& aTraj) const {
if (theMerger)
predTsos = theMerger->merge(predTsos);

if (!predTsos.isValid()) {
return Trajectory();
}

if ((*itm).recHit()->isValid()) {
//update
currTsos = updator()->update(predTsos, *(*itm).recHit());
Expand Down Expand Up @@ -204,6 +208,9 @@ Trajectory GsfTrajectorySmoother::trajectory(const Trajectory& aTraj) const {
if (theMerger)
currTsos = theMerger->merge(currTsos);

if (!currTsos.isValid()) {
return Trajectory();
}
dump(currTsos, "currTsos", "GsfTrackFitters");
}

Expand Down

0 comments on commit 2e1911f

Please sign in to comment.