Merge pull request #10290 from samcake/hotfix

Build 37.2 Hotfix to fix a crash with texture loading and Qt build 5.6.2
This commit is contained in:
Chris Collins 2017-04-26 14:28:24 -07:00 committed by GitHub
commit 3b839d3f9b

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>();