bugfix: only try to parse the TorVersion if there is one.

svn:r5697
This commit is contained in:
Roger Dingledine 2006-01-02 04:58:12 +00:00
parent 839111b85a
commit aa604ef2c2

View File

@ -3531,7 +3531,7 @@ or_state_validate(or_state_t *old_state, or_state_t *state)
warn(LD_GENERAL, "Unable to parse entry nodes: %s", err);
return -1;
}
if (tor_version_parse(state->TorVersion, &v)) {
if (state->TorVersion && tor_version_parse(state->TorVersion, &v)) {
warn(LD_GENERAL, "Can't parse Tor version '%s' from your state file. "
"Proceeding anyway.", state->TorVersion);
}