TerraSync: fix crashes with null file return

Not sure how this is happening, but, check for a null file object
in FileGetRequest::onDone.
This commit is contained in:
James Turner 2020-11-29 16:22:09 +00:00
parent 79252d889c
commit de268300fb

View File

@ -995,7 +995,10 @@ HTTPRepository::failure() const
}
void onDone() override {
file->close();
if (file) {
file->close();
}
if (responseCode() == 200) {
std::string hash =
strutils::encodeHex(sha1_result(&hashContext), HASH_LENGTH);