Another check for null pointers.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@10664 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2016-01-11 21:47:58 +00:00
parent 6f7a2e50dd
commit 516d6937ee

View File

@ -3969,6 +3969,14 @@ tidy_min_surface(void)
error_msg(error_string);
continue;
}
if (elt_ptr->master->s == NULL || elt_ptr->master->s->name == NULL)
{
input_error++;
error_string = sformatf("Unknown master species definition in SURFACE \n\t for surface related to equilibrium_phase: SURFACE %d.",
surface_ptr->Get_n_user());
error_msg(error_string);
continue;
}
if (strcmp(elt_ptr->master->s->name, temp_formula) != 0)
{
error_string = sformatf("Suggest using master species formula in SURFACE \n\t for surface related to equilibrium_phase: %s.",