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
committed by Automatic Release Builder
parent d0db407faa
commit bfcdf22705

View File

@@ -994,7 +994,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);