diff --git a/libraries/gpu/src/gpu/Texture.cpp b/libraries/gpu/src/gpu/Texture.cpp index 833647bbda..281d768182 100755 --- a/libraries/gpu/src/gpu/Texture.cpp +++ b/libraries/gpu/src/gpu/Texture.cpp @@ -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) { diff --git a/libraries/model/src/model/TextureMap.cpp b/libraries/model/src/model/TextureMap.cpp index 3f10f66256..417fd6992e 100755 --- a/libraries/model/src/model/TextureMap.cpp +++ b/libraries/model/src/model/TextureMap.cpp @@ -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; }