Merge pull request #7501 from zzmp/fix/parse-tex

Respond to error from free in texture parsing
This commit is contained in:
Brad Hefta-Gaub 2016-03-30 08:53:15 -07:00
commit 32308c7810

View file

@ -105,7 +105,7 @@ int RenderableModelEntityItem::readEntitySubclassDataFromBuffer(const unsigned c
QVariantMap RenderableModelEntityItem::parseTexturesToMap(QString textures) {
// If textures are unset, revert to original textures
if (textures == "") {
if (textures.isEmpty()) {
return _originalTextures;
}
@ -120,7 +120,9 @@ QVariantMap RenderableModelEntityItem::parseTexturesToMap(QString textures) {
qCWarning(entitiesrenderer) << "Could not evaluate textures property value:" << _textures;
return _originalTextures;
}
return texturesJson.object().toVariantMap();
auto parsed = texturesJson.toVariant();
return parsed.toMap();
}
void RenderableModelEntityItem::remapTextures() {