Skip to content

Commit

Permalink
Exception caught in PhreeqcI. Null pointer for bad definition in SURF…
Browse files Browse the repository at this point in the history
…ACE_MASTER_SPECIES. Test case surf_error added, which catches the error, but run exits.
  • Loading branch information
dlparkhurst committed Dec 2, 2024
1 parent 0cd7521 commit 5d98135
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/tidy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5d98135

Please # to comment.