summaryrefslogtreecommitdiff
path: root/math/newmat/patches/patch-newmat6.cpp
blob: 171a65df132a92a2a8b207069f6257bf3a383727 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$NetBSD: patch-newmat6.cpp,v 1.1 2016/12/17 23:31:35 joerg Exp $

Check pointer for NULLness, not whether it is "positive".

--- newmat6.cpp.orig	2016-12-10 15:33:44.625762128 +0000
+++ newmat6.cpp
@@ -428,7 +428,7 @@ void CroutMatrix::operator=(const CroutM
 {
    if (&gm == this) { REPORT tag_val = -1; return; }
    REPORT
-   if (indx > 0) { delete [] indx; indx = 0; }
+   if (indx) { delete [] indx; indx = 0; }
    ((CroutMatrix&)gm).get_aux(*this);
    Eq(gm);
 }