must not access thermo class, if not yet created

This commit is contained in:
Axel Kohlmeyer
2024-08-08 04:37:59 -04:00
parent b9e7c9534b
commit 45e90ac2f8

View File

@ -884,7 +884,7 @@ int Input::execute_command()
void Input::clear()
{
if (narg > 0) error->all(FLERR,"Illegal clear command: unexpected arguments but found {}", narg);
output->thermo->set_line(-1);
if (output->thermo) output->thermo->set_line(-1);
lmp->destroy();
lmp->create();
lmp->post_create();