Squashed 'phreeqcpp/' changes from c369020..b948e30

b948e30 Exception caught in PhreeqcI. Null pointer for bad definition in SURFACE_MASTER_SPECIES. Test case surf_error added, which catches the error, but run exits.

git-subtree-dir: phreeqcpp
git-subtree-split: b948e30d1ef801f52c99736b58e79dcff5537e23
This commit is contained in:
Darth Vader 2024-12-06 16:49:25 +00:00
parent 80bf22d292
commit 3c8e294fd3

View File

@ -2312,6 +2312,15 @@ tidy_species(void)
}
/* store sequence number in master structure */
master[i]->number = i;
if (master[i]->s == NULL)
{
input_error++;
error_string = sformatf(
"Species pointer is null for, %s. Check your _MASTER_ and _SPECIES definitions.",
master[i]->elt->name);
error_msg(error_string, STOP);
}
if (strcmp(master[i]->elt->name, "Alkalinity") != 0)
{
if (master[i]->primary == TRUE)