]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix a stupid bug triggered by Ralf: we delete the memory of a matrix if its size...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 4 Dec 1998 17:59:38 +0000 (17:59 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 4 Dec 1998 17:59:38 +0000 (17:59 +0000)
git-svn-id: https://svn.dealii.org/trunk@682 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/dsmatrix.cc

index 7afbf58e29f8038cc58f05a8e2ee58d5d8e3ab25..89203aa23847eafd57b4c901195382d2af80528d 100644 (file)
@@ -68,7 +68,8 @@ dSMatrixStruct::reinit (const unsigned int m, const unsigned int n,
   vec_len = m * max_per_row;
   max_row_len = max_per_row;
 
-  if (m*n == 0)
+                                  // delete empty matrices
+  if ((m==0) || (n==0))
     {
       if (rowstart)  delete[] rowstart;
       if (colnums)   delete[] colnums;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.