mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -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 {
|
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];
|
smin = swco[regID - 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2494,7 +2497,10 @@ max2PSatSum(const RawCurve& fi,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
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];
|
smin = sgco[regID - 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user