mirror of
https://github.com/lubosz/overte.git
synced 2025-04-19 08:58:02 +02:00
fix parent loop crash
This commit is contained in:
parent
a63f3e76c8
commit
081e62a647
2 changed files with 8 additions and 3 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) {
|
||||
breakParentingLoop();
|
||||
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