mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge pull request #14995 from SamGondelman/parentCrash
Case 21391: Fix parent loop crash
This commit is contained in:
commit
dc6bdfae8a
2 changed files with 9 additions and 4 deletions
|
@ -1420,11 +1420,16 @@ QUuid SpatiallyNestable::getEditSenderID() {
|
|||
return editSenderID;
|
||||
}
|
||||
|
||||
void SpatiallyNestable::bumpAncestorChainRenderableVersion() const {
|
||||
void SpatiallyNestable::bumpAncestorChainRenderableVersion(int depth) const {
|
||||
if (depth > MAX_PARENTING_CHAIN_SIZE) {
|
||||
// can't break the parent chain here, because it will call setParentID, which calls this
|
||||
return;
|
||||
}
|
||||
|
||||
_ancestorChainRenderableVersion++;
|
||||
bool success = false;
|
||||
auto parent = getParentPointer(success);
|
||||
if (success && parent) {
|
||||
parent->bumpAncestorChainRenderableVersion();
|
||||
parent->bumpAncestorChainRenderableVersion(depth + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -221,7 +221,7 @@ public:
|
|||
bool hasGrabs();
|
||||
virtual QUuid getEditSenderID();
|
||||
|
||||
void bumpAncestorChainRenderableVersion() const;
|
||||
void bumpAncestorChainRenderableVersion(int depth = 0) const;
|
||||
|
||||
protected:
|
||||
QUuid _id;
|
||||
|
|
Loading…
Reference in a new issue