Protection when setting geometry to be loaded from file (Andrei)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 May 2007 15:22:24 +0000 (15:22 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 May 2007 15:22:24 +0000 (15:22 +0000)
STEER/AliRun.cxx

index d185070..f26e394 100644 (file)
@@ -283,7 +283,7 @@ void AliRun::SetRootGeometry(Bool_t flag)
 {
 // Instruct application that the geometry is to be retreived from a root file.
    fIsRootGeometry = flag;
-   if (flag) gMC->SetRootGeometry();
+   if (flag && gMC) gMC->SetRootGeometry();
 }
 //_______________________________________________________________________
 void AliRun::SetField(Int_t type, Int_t version, Float_t scale,