Additional protection
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 5 May 2004 16:12:32 +0000 (16:12 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 5 May 2004 16:12:32 +0000 (16:12 +0000)
STEER/AliFieldMap.cxx

index 78c839a..edcc523 100644 (file)
@@ -240,6 +240,8 @@ void AliFieldMap::Field(Float_t *x, Float_t *b) const
     raty1=kone-raty;
     ratz1=kone-ratz;
 
+    if (!fB) return;
+
     bhyhz = Bx(ix  ,iy+1,iz+1)*ratx1+Bx(ix+1,iy+1,iz+1)*ratx;
     bhylz = Bx(ix  ,iy+1,iz  )*ratx1+Bx(ix+1,iy+1,iz  )*ratx;
     blyhz = Bx(ix  ,iy  ,iz+1)*ratx1+Bx(ix+1,iy  ,iz+1)*ratx;