Skip to content

Commit c230f6e

Browse files
committed
Fix segfault when using interrupt
1 parent 4c9ecd1 commit c230f6e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

highs/ipm/hipo/ipm/Solver.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ void Solver::solve() {
4444
return;
4545
}
4646

47+
// iterate object needs to be initialised before potentially interrupting
48+
it_.reset(new Iterate(model_, regul_));
49+
4750
if (checkInterrupt()) return;
4851

4952
printInfo();
@@ -73,9 +76,6 @@ bool Solver::initialise() {
7376

7477
start_time_ = control_.elapsed();
7578

76-
// initialise iterate object
77-
it_.reset(new Iterate(model_, regul_));
78-
7979
// initialise linear solver
8080
LS_.reset(new FactorHiGHSSolver(options_, model_, regul_, &info_, &it_->data,
8181
logH_));

0 commit comments

Comments
 (0)