Bringing a fix to the ImageReader::read crash to stable

This commit is contained in:
samcake 2017-04-26 11:04:48 -07:00
parent 71bc8804ec
commit 2d4ac0fc43

View file

@ -559,9 +559,12 @@ void ImageReader::read() {
// Load the image into a gpu::Texture
auto networkTexture = resource.staticCast<NetworkTexture>();
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<TextureCache>();