Fix pointer logic errors in initThermoXML

Affects DebyeHuckel and HMWSoln
This commit is contained in:
Ray Speth 2015-07-31 21:12:42 -04:00
parent f90bf978df
commit 546eede80c
2 changed files with 2 additions and 2 deletions

View file

@ -978,7 +978,7 @@ void DebyeHuckel::initThermoXML(XML_Node& phaseNode, const std::string& id_)
for (size_t k = 0; k < m_kk; k++) {
std::string kname = speciesName(k);
const XML_Node* spPtr = xspecies[k];
if (!spPtr) {
if (spPtr) {
if (spPtr->hasChild("electrolyteSpeciesType")) {
std::string est = getChildValue(*spPtr, "electrolyteSpeciesType");
if ((m_electrolyteSpeciesType[k] = interp_est(est)) == -1) {

View file

@ -1496,7 +1496,7 @@ void HMWSoln::initThermoXML(XML_Node& phaseNode, const std::string& id_)
std::vector<const XML_Node*> xspecies = speciesData();
for (size_t k = 0; k < m_kk; k++) {
const XML_Node* spPtr = xspecies[k];
if (!spPtr) {
if (spPtr) {
if (spPtr->hasChild("electrolyteSpeciesType")) {
string est = getChildValue(*spPtr, "electrolyteSpeciesType");
if ((m_electrolyteSpeciesType[k] = interp_est(est)) == -1) {