16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 02:29:19 +02:00

basic patches for most of discovered memory leaks, fixes for brake system components

This commit is contained in:
tmj-fstate
2017-01-18 07:56:51 +01:00
parent 4da7fedfe1
commit 6ab550831d
33 changed files with 824 additions and 929 deletions

View File

@@ -102,7 +102,7 @@ TTrack * TTrackFollower::SetCurrentTrack(TTrack *pTrack, int end)
pCurrentTrack->AxleCounter(-1, Owner); // opuszczenie tamtego toru
}
pCurrentTrack = pTrack;
pCurrentSegment = (pCurrentTrack ? pCurrentTrack->CurrentSegment() : NULL);
pCurrentSegment = ( pCurrentTrack != nullptr ? pCurrentTrack->CurrentSegment() : nullptr );
if (!pCurrentTrack)
Error(Owner->MoverParameters->Name + " at NULL track");
return pCurrentTrack;