mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 01:06:25 +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::Pixels::~Pixels() {
|
||||||
Texture::updateTextureCPUMemoryUsage(_storage->size(), 0);
|
if (_storage) {
|
||||||
|
Texture::updateTextureCPUMemoryUsage(_storage->size(), 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Texture::Storage::assignTexture(Texture* texture) {
|
void Texture::Storage::assignTexture(Texture* texture) {
|
||||||
|
|
|
@ -85,7 +85,7 @@ QImage processSourceImage(const QImage& srcImage, bool cubemap) {
|
||||||
return srcImage;
|
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) {
|
if (!srcTexture) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue