Squashed bugs found by @mikekaganski; See #483

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2015-02-21 11:26:24 -07:00
parent 0504516a01
commit 6d2f52f230
4 changed files with 5 additions and 3 deletions

View File

@@ -229,8 +229,10 @@ void _PropsSI_initialize(const std::string &backend,
State->set_mole_fractions(*fractions_ptr);
}
} else if (State->using_mass_fractions()){
if (fractions_ptr == NULL){ throw ValueError("fractions_ptr is NULL");}
State->set_mass_fractions(*fractions_ptr);
} else if (State->using_volu_fractions()){
if (fractions_ptr == NULL){ throw ValueError("fractions_ptr is NULL");}
State->set_volu_fractions(*fractions_ptr);
} else {
if (get_debug_level()>50) std::cout << format("%s:%d: _PropsSI, could not set composition to %s, defaulting to mole fraction.\n",__FILE__,__LINE__, vec_to_string(z).c_str()).c_str();