Avoid a possible crash in tls_log_errors.