Skip to content

Commit

Permalink
Fix pointer logic errors in initThermoXML
Browse files Browse the repository at this point in the history
Affects DebyeHuckel and HMWSoln
  • Loading branch information
speth committed Aug 3, 2015
1 parent f90bf97 commit 546eede
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/thermo/DebyeHuckel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/thermo/HMWSoln_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 546eede

Please sign in to comment.