]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONPolygon.cxx
Minor change for LHC11e
[u/mrichter/AliRoot.git] / MUON / AliMUONPolygon.cxx
index 3b976bae9b168a09af4c1653926e1471bd783985..7df70ca46d5faf8ed1c68195e1687a3716f9ba9d 100644 (file)
@@ -116,13 +116,20 @@ void AliMUONPolygon::Copy(TObject& obj) const
   
   AliMUONPolygon& rhs = static_cast<AliMUONPolygon&>(obj);
 
-  Double_t* x = new Double_t[fN];
-  Double_t* y = new Double_t[fN];
+  Double_t* x(0x0);
+  Double_t* y(0x0);
   
-  for ( Int_t i = 0; i < fN; ++i )
+  if ( fN > 0 )
   {
-    x[i] = fX[i];
-    y[i] = fY[i];
+    x = new Double_t[fN];
+    y = new Double_t[fN];
+    
+    for ( Int_t i = 0; i < fN; ++i )
+    {
+      x[i] = fX[i];
+      y[i] = fY[i];
+    }
+  
   }
   
   delete [] rhs.fX;