mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
Fix refresh crash with ktx textures
This commit is contained in:
parent
7999ed6f60
commit
a886963e20
1 changed files with 9 additions and 1 deletions
|
@ -472,6 +472,10 @@ void NetworkTexture::startMipRangeRequest(uint16_t low, uint16_t high) {
|
|||
void NetworkTexture::ktxHeaderRequestFinished() {
|
||||
Q_ASSERT(_ktxResourceState == LOADING_INITIAL_DATA);
|
||||
|
||||
if (!_ktxHeaderRequest) {
|
||||
return;
|
||||
}
|
||||
|
||||
_ktxHeaderRequestFinished = true;
|
||||
maybeHandleFinishedInitialLoad();
|
||||
}
|
||||
|
@ -479,6 +483,10 @@ void NetworkTexture::ktxHeaderRequestFinished() {
|
|||
void NetworkTexture::ktxMipRequestFinished() {
|
||||
Q_ASSERT(_ktxResourceState == LOADING_INITIAL_DATA || _ktxResourceState == REQUESTING_MIP);
|
||||
|
||||
if (!_ktxMipRequest) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_ktxResourceState == LOADING_INITIAL_DATA) {
|
||||
_ktxHighMipRequestFinished = true;
|
||||
maybeHandleFinishedInitialLoad();
|
||||
|
@ -683,7 +691,7 @@ void NetworkTexture::loadContent(const QByteArray& content) {
|
|||
}
|
||||
|
||||
void NetworkTexture::refresh() {
|
||||
if ((_ktxHeaderRequest || _ktxMipRequest) && !loaded && !_failedToLoad) {
|
||||
if ((_ktxHeaderRequest || _ktxMipRequest) && !_loaded && !_failedToLoad) {
|
||||
return;
|
||||
}
|
||||
if (_ktxHeaderRequest || _ktxMipRequest) {
|
||||
|
|
Loading…
Reference in a new issue