mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 07:52:55 +02:00
Add check for valid mutableData in assignMipData
This commit is contained in:
parent
64bf5784e6
commit
26247e8653
1 changed files with 5 additions and 0 deletions
|
@ -265,6 +265,11 @@ void KtxStorage::assignMipData(uint16 level, const storage::StoragePointer& stor
|
||||||
}
|
}
|
||||||
|
|
||||||
auto fileData = file->mutableData();
|
auto fileData = file->mutableData();
|
||||||
|
if (!fileData) {
|
||||||
|
qWarning() << "Failed to get mutable data for " << QString::fromStdString(_filename);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto imageData = fileData;
|
auto imageData = fileData;
|
||||||
imageData += ktx::KTX_HEADER_SIZE + _ktxDescriptor->header.bytesOfKeyValueData + _ktxDescriptor->images[level]._imageOffset;
|
imageData += ktx::KTX_HEADER_SIZE + _ktxDescriptor->header.bytesOfKeyValueData + _ktxDescriptor->images[level]._imageOffset;
|
||||||
imageData += ktx::IMAGE_SIZE_WIDTH;
|
imageData += ktx::IMAGE_SIZE_WIDTH;
|
||||||
|
|
Loading…
Reference in a new issue