From ac2c2854795aac89ad5e488d0712a17b90f9afe3 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Fri, 5 Sep 2008 23:53:47 +0000 Subject: [PATCH] Added an AssertThrowMsg at a point which is frequently reached when the object hasn't been properly inialized. --- Cantera/src/thermo/VPStandardStateTP.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Cantera/src/thermo/VPStandardStateTP.cpp b/Cantera/src/thermo/VPStandardStateTP.cpp index 47e641151..7e06fa07d 100644 --- a/Cantera/src/thermo/VPStandardStateTP.cpp +++ b/Cantera/src/thermo/VPStandardStateTP.cpp @@ -445,6 +445,8 @@ namespace Cantera { double Tnow = temperature(); m_Plast_ss = m_Pcurrent; m_Tlast_ss = Tnow; + AssertThrowMsg(m_VPSS_ptr != 0, "VPStandardStateTP::_updateStandardStateThermo()", + "Probably indicates that ThermoPhase object wasn't initialized correctly"); m_VPSS_ptr->setState_TP(Tnow, m_Pcurrent); }