Check that UDQ value is numeric before comparing with zero

This commit is contained in:
Joakim Hove 2020-10-25 19:16:50 +01:00
parent 604cbef5dc
commit de51e3e3a4

View File

@ -176,7 +176,7 @@ void Well::WellProductionProperties::handleWCONPROD(const std::optional<VFPProdT
if( !record.getItem( cmode.first ).defaultApplied( 0 ) ) {
// a zero value THP limit will not be handled as a THP limit
if (cmode.first == "THP" && this->THPTarget.zero())
if (cmode.first == "THP" && this->THPTarget.is<double>() && this->THPTarget.zero())
continue;
this->addProductionControl( cmode.second );