Skip to content

Commit 7985d2c

Browse files
committed
fix mistake in DEBUG mode
1 parent 39eae0c commit 7985d2c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/OsiClp/OsiClpSolverInterface.cpp

+7-5
Original file line numberDiff line numberDiff line change
@@ -7939,11 +7939,13 @@ void OsiClpSolverInterface::crunch()
79397939
small = static_cast< ClpSimplexOther * >(modelPtr_)->crunch(rhs, whichRow, whichColumn,
79407940
nBound, moreBounds, tightenBounds);
79417941
#ifndef NDEBUG
7942-
int nCopy = 3 * numberRows + 2 * numberColumns;
7943-
for (int i = 0; i < nCopy; i++) {
7944-
if (i>=small->getNumRows()&&i<numberRows)
7945-
continue; // row was removed so doesn't matter
7946-
assert(whichRow[i] >= -CoinMax(numberRows, numberColumns) && whichRow[i] < CoinMax(numberRows, numberColumns));
7942+
if (small) {
7943+
int nCopy = 3 * numberRows + 2 * numberColumns;
7944+
for (int i = 0; i < nCopy; i++) {
7945+
if (i>=small->getNumRows()&&i<numberRows)
7946+
continue; // row was removed so doesn't matter
7947+
assert(whichRow[i] >= -CoinMax(numberRows, numberColumns) && whichRow[i] < CoinMax(numberRows, numberColumns));
7948+
}
79477949
}
79487950
#endif
79497951
smallModel_ = small;

0 commit comments

Comments
 (0)