mirror of
https://github.com/JulianGro/overte.git
synced 2025-05-08 22:59:31 +02:00
Merge pull request #8700 from ZappoMan/fetchTextureMapCrashFix
fix crash when bouncing to eschatology and eschatology-dev
This commit is contained in:
commit
c7551a2207
1 changed files with 7 additions and 3 deletions
|
@ -377,8 +377,10 @@ void GeometryResource::deleter() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeometryResource::setTextures() {
|
void GeometryResource::setTextures() {
|
||||||
for (const FBXMaterial& material : _fbxGeometry->materials) {
|
if (_fbxGeometry) {
|
||||||
_materials.push_back(std::make_shared<NetworkMaterial>(material, _textureBaseUrl));
|
for (const FBXMaterial& material : _fbxGeometry->materials) {
|
||||||
|
_materials.push_back(std::make_shared<NetworkMaterial>(material, _textureBaseUrl));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -457,7 +459,9 @@ model::TextureMapPointer NetworkMaterial::fetchTextureMap(const QUrl& baseUrl, c
|
||||||
_textures[channel] = Texture { fbxTexture.name, texture };
|
_textures[channel] = Texture { fbxTexture.name, texture };
|
||||||
|
|
||||||
auto map = std::make_shared<model::TextureMap>();
|
auto map = std::make_shared<model::TextureMap>();
|
||||||
map->setTextureSource(texture->_textureSource);
|
if (texture) {
|
||||||
|
map->setTextureSource(texture->_textureSource);
|
||||||
|
}
|
||||||
map->setTextureTransform(fbxTexture.transform);
|
map->setTextureTransform(fbxTexture.transform);
|
||||||
|
|
||||||
return map;
|
return map;
|
||||||
|
|
Loading…
Reference in a new issue