Fixing potencial null pointer bug.
authoraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 Jan 2011 12:43:41 +0000 (12:43 +0000)
committeraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 Jan 2011 12:43:41 +0000 (12:43 +0000)
HLT/MUON/AliHLTMUONProcessor.cxx

index 81a241a..7f7c2d5 100644 (file)
@@ -671,7 +671,7 @@ int AliHLTMUONProcessor::FetchFieldIntegral(Double_t& bfieldintegral) const
        {
                TVirtualMagField* vfield = TGeoGlobalMagField::Instance()->GetField();
                AliMagF* field = dynamic_cast<AliMagF*>(vfield);
-               if (vfield->IsA() != AliMagF::Class() and field != NULL)
+               if (vfield->IsA() != AliMagF::Class() or field == NULL)
                {
                        HLTError(Form(
                                "The magnetic field is not of type AliMagF."