must not pass NULL pointer now that we use const std::string references

This commit is contained in:
Axel Kohlmeyer
2020-07-04 04:48:16 -04:00
parent fac3c70d02
commit de815ed6ba

View File

@ -1725,7 +1725,7 @@ int lammps_get_last_error_message(void *ptr, char * buffer, int buffer_size) {
if(!error->get_last_error().empty()) {
int error_type = error->get_last_error_type();
strncpy(buffer, error->get_last_error().c_str(), buffer_size-1);
error->set_last_error(NULL, ERROR_NONE);
error->set_last_error("", ERROR_NONE);
return error_type;
}
return 0;