]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONCluster.cxx
Fix copy ctor in case there is no stored pads (Laurent)
[u/mrichter/AliRoot.git] / MUON / AliMUONCluster.cxx
index c44a65465a2e922b6b789de1302ec159f1a2014e..b8ead010399961982e002135f6eb8306df906e9a 100644 (file)
@@ -203,7 +203,11 @@ AliMUONCluster::Copy(TObject& obj) const
   ///
   TObject::Copy(obj);
   AliMUONCluster& dest = static_cast<AliMUONCluster&>(obj);
-  dest.fPads = static_cast<TObjArray*>(fPads->Clone());
+  dest.fPads = 0x0;
+  if ( fPads )
+  {
+    dest.fPads = static_cast<TObjArray*>(fPads->Clone());
+  }
   dest.fHasPosition = fHasPosition;
   dest.fPosition = fPosition;
   dest.fPositionError = fPositionError;