]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliLego.cxx
Updates (Chiara)
[u/mrichter/AliRoot.git] / STEER / AliLego.cxx
index d638cedf0932b26a362f240aba21aa74b9023c9f..5e5e53563ec6418279bf06ddaf13217498cf8920 100644 (file)
@@ -314,7 +314,7 @@ void AliLego::StepManager()
            TClonesArray &lvols = *fVolumesFwd;
            if (fStepsForward > 0) {
                AliDebugVolume* tmp = dynamic_cast<AliDebugVolume*>((*fVolumesFwd)[fStepsForward-1]);
-               if (tmp->IsVEqual(vol, copy) && gMC->IsTrackEntering()) {
+               if (tmp && tmp->IsVEqual(vol, copy) && gMC->IsTrackEntering()) {
                    fStepsForward -= 2;
                    fVolumesFwd->RemoveAt(fStepsForward);
                    fVolumesFwd->RemoveAt(fStepsForward+1);