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 c0772d236a
commit 6d4540435e
2 changed files with 2 additions and 2 deletions

View file

@ -1037,7 +1037,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

@ -1533,7 +1533,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) {