mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 22:16:39 +02:00
Bringing a fix to the ImageReader::read crash to stable
This commit is contained in:
parent
71bc8804ec
commit
2d4ac0fc43
1 changed files with 4 additions and 1 deletions
|
@ -559,9 +559,12 @@ void ImageReader::read() {
|
||||||
// Load the image into a gpu::Texture
|
// Load the image into a gpu::Texture
|
||||||
auto networkTexture = resource.staticCast<NetworkTexture>();
|
auto networkTexture = resource.staticCast<NetworkTexture>();
|
||||||
texture.reset(networkTexture->getTextureLoader()(image, url));
|
texture.reset(networkTexture->getTextureLoader()(image, url));
|
||||||
texture->setSource(url);
|
|
||||||
if (texture) {
|
if (texture) {
|
||||||
|
texture->setSource(url);
|
||||||
texture->setFallbackTexture(networkTexture->getFallbackTexture());
|
texture->setFallbackTexture(networkTexture->getFallbackTexture());
|
||||||
|
} else {
|
||||||
|
qCDebug(modelnetworking) << _url << "loading stopped; texture wasn't created";
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto textureCache = DependencyManager::get<TextureCache>();
|
auto textureCache = DependencyManager::get<TextureCache>();
|
||||||
|
|
Loading…
Reference in a new issue