mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 16:41:02 +02:00
Merge pull request #7501 from zzmp/fix/parse-tex
Respond to error from free in texture parsing
This commit is contained in:
commit
32308c7810
1 changed files with 4 additions and 2 deletions
|
@ -105,7 +105,7 @@ int RenderableModelEntityItem::readEntitySubclassDataFromBuffer(const unsigned c
|
||||||
|
|
||||||
QVariantMap RenderableModelEntityItem::parseTexturesToMap(QString textures) {
|
QVariantMap RenderableModelEntityItem::parseTexturesToMap(QString textures) {
|
||||||
// If textures are unset, revert to original textures
|
// If textures are unset, revert to original textures
|
||||||
if (textures == "") {
|
if (textures.isEmpty()) {
|
||||||
return _originalTextures;
|
return _originalTextures;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,9 @@ QVariantMap RenderableModelEntityItem::parseTexturesToMap(QString textures) {
|
||||||
qCWarning(entitiesrenderer) << "Could not evaluate textures property value:" << _textures;
|
qCWarning(entitiesrenderer) << "Could not evaluate textures property value:" << _textures;
|
||||||
return _originalTextures;
|
return _originalTextures;
|
||||||
}
|
}
|
||||||
return texturesJson.object().toVariantMap();
|
|
||||||
|
auto parsed = texturesJson.toVariant();
|
||||||
|
return parsed.toMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderableModelEntityItem::remapTextures() {
|
void RenderableModelEntityItem::remapTextures() {
|
||||||
|
|
Loading…
Reference in a new issue