Changeset 1511


Ignore:
Timestamp:
Feb 8, 2010 11:25:08 AM (10 years ago)
Author:
forrest
Message:

fix seg fault if dual on null problem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/1.11/Clp/src/ClpSimplex.cpp

    r1509 r1511  
    51275127{
    51285128  //double savedPivotTolerance = factorization_->pivotTolerance();
    5129   int saveQuadraticActivated = objective_->activated();
    5130   objective_->setActivated(0);
     5129  int saveQuadraticActivated = 0;
     5130  if (objective_) {
     5131    saveQuadraticActivated = objective_->activated();
     5132    objective_->setActivated(0);
     5133  } else {
     5134    // create dummy stuff
     5135    assert (!numberColumns_);
     5136    if (!numberRows_)
     5137      problemStatus_=0; // say optimal
     5138    return 0;
     5139  }
    51315140  ClpObjective * saveObjective = objective_;
    51325141  CoinAssert (ifValuesPass>=0&&ifValuesPass<3);
     
    53465355  if (saveObjective != objective_) {
    53475356    // We changed objective to see if infeasible
    5348     printf("ZZ DUAL objective_ %x saveObjective %x\n",
     5357    printf("ZZ DUAL objective_ %p saveObjective %p\n",
    53495358           objective_,saveObjective);
    53505359    delete objective_;
     
    56135622  if (saveObjective != objective_) {
    56145623    // We changed objective to see if infeasible
    5615     printf("ZZ DUAL objective_ %x saveObjective %x\n",
     5624    printf("ZZ PRIMAL objective_ %p saveObjective %p\n",
    56165625           objective_,saveObjective);
    56175626    delete objective_;
Note: See TracChangeset for help on using the changeset viewer.