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:
Andreas Lauser 2017-01-09 12:08:29 +01:00
parent f50dc9507f
commit 12083ccfd0

View File

@ -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);
}