mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 13:56:24 +02:00
Merge pull request #5799 from huffman/move-assert
Move assert in asset request
This commit is contained in:
commit
2385331075
1 changed files with 1 additions and 2 deletions
|
@ -76,8 +76,6 @@ void AssetRequest::start() {
|
|||
auto assetClient = DependencyManager::get<AssetClient>();
|
||||
assetClient->getAsset(_hash, _extension, start, end, [this, start, end](bool responseReceived, AssetServerError serverError,
|
||||
const QByteArray& data) {
|
||||
Q_ASSERT(data.size() == (end - start));
|
||||
|
||||
if (!responseReceived) {
|
||||
_error = NetworkError;
|
||||
} else if (serverError != AssetServerError::NoError) {
|
||||
|
@ -93,6 +91,7 @@ void AssetRequest::start() {
|
|||
break;
|
||||
}
|
||||
} else {
|
||||
Q_ASSERT(data.size() == (end - start));
|
||||
|
||||
// we need to check the hash of the received data to make sure it matches what we expect
|
||||
if (hashData(data).toHex() == _hash) {
|
||||
|
|
Loading…
Reference in a new issue