In the very rare case of pPivot being NULL, prevent a crsh
by reordering the matrix.
This commit is contained in:
parent
d9b52eb3e1
commit
da77fad749
|
|
@ -228,6 +228,11 @@ spOrderAndFactor(MatrixPtr Matrix, RealNumber RHS[], RealNumber RelThreshold,
|
|||
INCRESP;
|
||||
#endif
|
||||
pPivot = Matrix->Diag[Step];
|
||||
if (!pPivot) {
|
||||
fprintf(stderr, "Warning: spfactor.c, 230, Pivot for step = %d not found\n", Step);
|
||||
ReorderingRequired = YES;
|
||||
break; /* for loop */
|
||||
}
|
||||
LargestInCol = FindLargestInCol(pPivot->NextInCol);
|
||||
if ((LargestInCol * RelThreshold < ELEMENT_MAG(pPivot))) {
|
||||
if (Matrix->Complex)
|
||||
|
|
|
|||
Loading…
Reference in New Issue