From 2d4ac0fc436b05a7452e847d2f387fe1f0a6dbb6 Mon Sep 17 00:00:00 2001 From: samcake Date: Wed, 26 Apr 2017 11:04:48 -0700 Subject: [PATCH] Bringing a fix to the ImageReader::read crash to stable --- .../model-networking/src/model-networking/TextureCache.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/model-networking/src/model-networking/TextureCache.cpp b/libraries/model-networking/src/model-networking/TextureCache.cpp index 98b03eba1e..b8d3a51534 100644 --- a/libraries/model-networking/src/model-networking/TextureCache.cpp +++ b/libraries/model-networking/src/model-networking/TextureCache.cpp @@ -559,9 +559,12 @@ void ImageReader::read() { // Load the image into a gpu::Texture auto networkTexture = resource.staticCast(); texture.reset(networkTexture->getTextureLoader()(image, url)); - texture->setSource(url); if (texture) { + texture->setSource(url); texture->setFallbackTexture(networkTexture->getFallbackTexture()); + } else { + qCDebug(modelnetworking) << _url << "loading stopped; texture wasn't created"; + return; } auto textureCache = DependencyManager::get();