]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliLHCDipValT.h
AddTrial method added, changed trials to unsigned int
[u/mrichter/AliRoot.git] / STEER / AliLHCDipValT.h
index 439d9eaf65bd5765cbcac71c3ae7d43872c73b86..b2413fc658d3a077a4b1110cd33ed84e6834b38c 100755 (executable)
@@ -188,9 +188,9 @@ void AliLHCDipValT<Element>::SetSize(Int_t sz)
   if (sz>0) {
     arr = new Element[sz];
     int nc = GetSizeTotal() > sz ? sz:GetSizeTotal(); // n elems to copy
-    if (nc) memcpy(arr, fArray, nc*sizeof(Element));
+    if (nc && fArray) memcpy(arr, fArray, nc*sizeof(Element));
     if (nc<sz) memset(arr+nc, 0, (sz-nc)*sizeof(Element));
-    if (GetSizeTotal()) delete[] fArray;
+    if (fArray) delete[] fArray;
     fArray = arr;
     fSizeTot = sz;
   }