Skip to content

Commit

Permalink
TEPEMGEN: Prevent double deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
sawenzel committed Dec 5, 2023
1 parent 53ec5c4 commit b0a3f02
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions TEPEMGEN/TEpEmGen.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ TEpEmGen::~TEpEmGen()
// Destroys the object, deletes and disposes all TParticles currently on list.
fParticles->Delete();
delete fParticles;
fParticles = nullptr; // to prevent double deletion with TGenerator destructor
}

//______________________________________________________________________________
Expand Down

0 comments on commit b0a3f02

Please sign in to comment.