Skip to content

Commit 4cfa8c5

Browse files
committed
ouch - mistake on modifying assert
1 parent 4970557 commit 4cfa8c5

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Clp/src/OsiClp/OsiClpSolverInterface.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7530,11 +7530,13 @@ void OsiClpSolverInterface::crunch()
75307530
small = static_cast< ClpSimplexOther * >(modelPtr_)->crunch(rhs, whichRow, whichColumn,
75317531
nBound, moreBounds, tightenBounds);
75327532
#ifndef NDEBUG
7533-
int nCopy = 3 * numberRows + 2 * numberColumns;
7534-
for (int i = 0; i < nCopy; i++) {
7535-
if (i>=small->getNumRows()&&i<numberRows)
7536-
continue; // row was removed so doesn't matter
7537-
assert(whichRow[i] >= -CoinMax(numberRows, numberColumns) && whichRow[i] < CoinMax(numberRows, numberColumns));
7533+
if(small) {
7534+
int nCopy = 3 * numberRows + 2 * numberColumns;
7535+
for (int i = 0; i < nCopy; i++) {
7536+
if (i>=small->getNumRows()&&i<numberRows)
7537+
continue; // row was removed so doesn't matter
7538+
assert(whichRow[i] >= -CoinMax(numberRows, numberColumns) && whichRow[i] < CoinMax(numberRows, numberColumns));
7539+
}
75387540
}
75397541
#endif
75407542
smallModel_ = small;

0 commit comments

Comments
 (0)