mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-21 22:13:25 -06:00
Merge pull request #4086 from bska/dont-deref-nullptr
Max 2P Sat-Sum: Don't Dereference Null Pointer
This commit is contained in:
commit
83620e85fe
@ -2477,7 +2477,10 @@ max2PSatSum(const RawCurve& fi,
|
||||
}
|
||||
}
|
||||
else {
|
||||
const auto swco = this->wat_->swco();
|
||||
const auto swco = (this->wat_ != nullptr)
|
||||
? this->wat_->swco()
|
||||
: std::vector<double>(this->numTables_, 0.0);
|
||||
|
||||
smin = swco[regID - 1];
|
||||
}
|
||||
}
|
||||
@ -2494,7 +2497,10 @@ max2PSatSum(const RawCurve& fi,
|
||||
}
|
||||
}
|
||||
else {
|
||||
const auto sgco = this->gas_->sgco();
|
||||
const auto sgco = (this->gas_ != nullptr)
|
||||
? this->gas_->sgco()
|
||||
: std::vector<double>(this->numTables_, 0.0);
|
||||
|
||||
smin = sgco[regID - 1];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user