mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
BlackoilPropsAdFromDeck: don't rely on undefined behaviour when initializing the fluid system
in C++ references may be assumed to be non-null. thanks to [at]atgeirr for pointing this out.
This commit is contained in:
parent
f50dc9507f
commit
12083ccfd0
@ -158,7 +158,7 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
||||
|
||||
phase_usage_ = phaseUsageFromDeck(deck);
|
||||
|
||||
if (! (&FluidSystem::oilPvt()) ) {
|
||||
if (!FluidSystem::isInitialized()) {
|
||||
// make sure that we don't initialize the fluid system twice
|
||||
FluidSystem::initFromDeck(deck, eclState);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user