Caught SS definition errors if 2 components not defined.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7857 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2013-07-26 22:36:39 +00:00
parent d26571fbd7
commit e92025752e

View File

@ -4242,6 +4242,15 @@ ss_calc_a0_a1(cxxSS *ss_ptr)
tol = 1e-6;
rt = ss_ptr->Get_tk() * R_KJ_DEG_MOL;
if (ss_ptr->Get_ss_comps().size() < 2)
{
input_error++;
error_string = sformatf(
"Two components were not defined for %s solid solution",
ss_ptr->Get_name().c_str());
error_msg(error_string, CONTINUE);
return (ERROR);
}
cxxSScomp *comp0_ptr = &(ss_ptr->Get_ss_comps()[0]);
cxxSScomp *comp1_ptr = &(ss_ptr->Get_ss_comps()[1]);
int k;