Changeset 2002


Ignore:
Timestamp:
Jun 8, 2012 6:39:47 AM (7 years ago)
Author:
stefan
Message:

fix segfault: cut2rowIdx only has entries if oaHandler_->logLevel() > 0; oaHandler_ itself should always exist

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Bonmin/src/Interfaces/BonOsiTMINLPInterface.cpp

    r1987 r2002  
    20162016      violation = std::max(violation, rhs - ub[cutIdx]);
    20172017      violation = std::max(violation, lb[cutIdx] - rhs);
    2018       if(violation < theta && oaHandler_) {
     2018      if(violation < theta && oaHandler_->logLevel() > 0) {
    20192019          oaHandler_->message(CUT_NOT_VIOLATED_ENOUGH, oaMessages_)<<cut2rowIdx[cutIdx]<<violation<<CoinMessageEol;
    20202020        continue;}
    2021       if(oaHandler_)
     2021      if(oaHandler_->logLevel() > 0)
    20222022          oaHandler_->message(VIOLATED_OA_CUT_GENERATED, oaMessages_)<<cut2rowIdx[cutIdx]<<violation<<CoinMessageEol;
    20232023    }
Note: See TracChangeset for help on using the changeset viewer.