mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:08:00 +02:00
Merge pull request #6074 from huffman/fix-empty-hash
Fix crash when atp url is empty
This commit is contained in:
commit
c328941b9d
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ void AssetResourceRequest::doSend() {
|
||||||
// Make request to atp
|
// Make request to atp
|
||||||
auto assetClient = DependencyManager::get<AssetClient>();
|
auto assetClient = DependencyManager::get<AssetClient>();
|
||||||
auto parts = _url.path().split(".", QString::SkipEmptyParts);
|
auto parts = _url.path().split(".", QString::SkipEmptyParts);
|
||||||
auto hash = parts[0];
|
auto hash = parts.length() > 0 ? parts[0] : "";
|
||||||
auto extension = parts.length() > 1 ? parts[1] : "";
|
auto extension = parts.length() > 1 ? parts[1] : "";
|
||||||
|
|
||||||
if (hash.length() != SHA256_HASH_HEX_LENGTH) {
|
if (hash.length() != SHA256_HASH_HEX_LENGTH) {
|
||||||
|
|
Loading…
Reference in a new issue