mirror of
https://github.com/overte-org/overte.git
synced 2025-04-13 13:12:11 +02:00
Small bug when accessing inexisting storage from the Pixels
This commit is contained in:
parent
6882832abd
commit
94960a7a80
2 changed files with 4 additions and 2 deletions
|
@ -127,7 +127,9 @@ Texture::Pixels::Pixels(const Element& format, Size size, const Byte* bytes) :
|
|||
}
|
||||
|
||||
Texture::Pixels::~Pixels() {
|
||||
Texture::updateTextureCPUMemoryUsage(_storage->size(), 0);
|
||||
if (_storage) {
|
||||
Texture::updateTextureCPUMemoryUsage(_storage->size(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
void Texture::Storage::assignTexture(Texture* texture) {
|
||||
|
|
|
@ -85,7 +85,7 @@ QImage processSourceImage(const QImage& srcImage, bool cubemap) {
|
|||
return srcImage;
|
||||
}
|
||||
|
||||
gpu::Texture* cacheTexture(const std::string& name, gpu::Texture* srcTexture, bool write = true, bool read = true) {
|
||||
gpu::Texture* cacheTexture(const std::string& name, gpu::Texture* srcTexture, bool write = true, bool read = false) {
|
||||
if (!srcTexture) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue