mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-02 08:51:12 +02:00
Guard against Node linked-data being null
This commit is contained in:
parent
da6ca38282
commit
b8f79d3364
1 changed files with 5 additions and 2 deletions
|
@ -265,8 +265,11 @@ void AvatarMixer::start() {
|
||||||
nodeList->nestedEach([&](NodeList::const_iterator cbegin, NodeList::const_iterator cend) {
|
nodeList->nestedEach([&](NodeList::const_iterator cbegin, NodeList::const_iterator cend) {
|
||||||
std::for_each(cbegin, cend, [](const SharedNodePointer& node) {
|
std::for_each(cbegin, cend, [](const SharedNodePointer& node) {
|
||||||
if (node->getType() == NodeType::Agent) {
|
if (node->getType() == NodeType::Agent) {
|
||||||
auto& avatar = static_cast<AvatarMixerClientData*>(node->getLinkedData())->getAvatar();
|
NodeData* nodeData = node->getLinkedData();
|
||||||
avatar.setNeedsHeroCheck();
|
if (nodeData) {
|
||||||
|
auto& avatar = static_cast<AvatarMixerClientData*>(nodeData)->getAvatar();
|
||||||
|
avatar.setNeedsHeroCheck();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue