[cig-commits] r13506 - cs/cigma/trunk/src

luis at geodynamics.org luis at geodynamics.org
Tue Dec 9 18:12:51 PST 2008


Author: luis
Date: 2008-12-09 18:12:51 -0800 (Tue, 09 Dec 2008)
New Revision: 13506

Modified:
   cs/cigma/trunk/src/Quadrature.cpp
Log:
Use boolean check for null pointer value

Modified: cs/cigma/trunk/src/Quadrature.cpp
===================================================================
--- cs/cigma/trunk/src/Quadrature.cpp	2008-12-10 02:12:48 UTC (rev 13505)
+++ cs/cigma/trunk/src/Quadrature.cpp	2008-12-10 02:12:51 UTC (rev 13506)
@@ -201,8 +201,8 @@
 
 void Quadrature::reinit(int npts, int ndim)
 {
-    if (this->points)  { delete [] this->points; }
-    if (this->weights) { delete [] this->weights; }
+    if (this->points != 0)  { delete [] this->points; }
+    if (this->weights != 0) { delete [] this->weights; }
 
     this->npts = npts;
     this->ndim = ndim;



More information about the CIG-COMMITS mailing list