mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:24:07 +02:00
Merge pull request #13661 from danteruiz/avatarapp-undefined-data
fix avatar app from crashing when avatar entity variable is undefined.
This commit is contained in:
commit
4f45fbc5f5
1 changed files with 5 additions and 6 deletions
|
@ -159,13 +159,12 @@ function fromQml(message) { // messages are {method, params}, like json-rpc. See
|
|||
|
||||
for(var bookmarkName in message.data.bookmarks) {
|
||||
var bookmark = message.data.bookmarks[bookmarkName];
|
||||
if (!bookmark.avatarEntites) { // ensure avatarEntites always exist
|
||||
bookmark.avatarEntites = [];
|
||||
}
|
||||
|
||||
bookmark.avatarEntites.forEach(function(avatarEntity) {
|
||||
avatarEntity.properties.localRotationAngles = Quat.safeEulerAngles(avatarEntity.properties.localRotation)
|
||||
})
|
||||
if (bookmark.avatarEntites) {
|
||||
bookmark.avatarEntites.forEach(function(avatarEntity) {
|
||||
avatarEntity.properties.localRotationAngles = Quat.safeEulerAngles(avatarEntity.properties.localRotation);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
sendToQml(message)
|
||||
|
|
Loading…
Reference in a new issue