Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- G4HadFinalState* G4NeutronRadCapture::ApplyYourself(
- const G4HadProjectile& aTrack, G4Nucleus& theNucleus)
- {
- ....
- if (verboseLevel > 1) {
- G4cout << "Gamma 4-mom: " << lv2 << " "
- << theDef->GetParticleName() << " " << lv1 << G4endl;
- }
- if(theDef) {
- theParticleChange.AddSecondary(
- new G4DynamicParticle(theDef, lv1));
- }
- ....
- }
- This suspicious code was found in Geant4 project by PVS-Studio static code analyzer.
- Warning message is:
- V595 The 'theDef' pointer was utilized before it was verified against nullptr. Check lines: 123, 125. G4hadronic_deex_photon_evaporation g4neutronradcapture.cc 123
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment