mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 12:49:34 +02:00
Fix NetworkTexture self possibly being null when attempting request
This commit is contained in:
parent
9f688a08cd
commit
ef27d30e85
1 changed files with 6 additions and 1 deletions
|
@ -394,12 +394,17 @@ void NetworkTexture::startRequestForNextMipLevel() {
|
|||
}
|
||||
|
||||
if (_ktxResourceState == WAITING_FOR_MIP_REQUEST) {
|
||||
auto self = _self.lock();
|
||||
if (!self) {
|
||||
return;
|
||||
}
|
||||
|
||||
_ktxResourceState = PENDING_MIP_REQUEST;
|
||||
|
||||
init();
|
||||
setLoadPriority(this, -static_cast<int>(_originalKtxDescriptor->header.numberOfMipmapLevels) + _lowestKnownPopulatedMip);
|
||||
_url.setFragment(QString::number(_lowestKnownPopulatedMip - 1));
|
||||
TextureCache::attemptRequest(_self);
|
||||
TextureCache::attemptRequest(self);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue