diff --git a/Cantera/src/thermo/WaterProps.cpp b/Cantera/src/thermo/WaterProps.cpp index 65c8b7627..4c4e15f7e 100644 --- a/Cantera/src/thermo/WaterProps.cpp +++ b/Cantera/src/thermo/WaterProps.cpp @@ -44,8 +44,13 @@ namespace Cantera { m_waterIAPWS(0), m_own_sub(false) { - m_waterIAPWS = wptr->getWater(); - m_own_sub = false; + if (wptr) { + m_waterIAPWS = wptr->getWater(); + m_own_sub = false; + } else { + m_waterIAPWS = new WaterPropsIAPWS(); + m_own_sub = true; + } } /**