mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:27:48 +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;
|
return editSenderID;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpatiallyNestable::bumpAncestorChainRenderableVersion() const {
|
void SpatiallyNestable::bumpAncestorChainRenderableVersion(int depth) const {
|
||||||
|
if (depth > MAX_PARENTING_CHAIN_SIZE) {
|
||||||
|
breakParentingLoop();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
_ancestorChainRenderableVersion++;
|
_ancestorChainRenderableVersion++;
|
||||||
bool success = false;
|
bool success = false;
|
||||||
auto parent = getParentPointer(success);
|
auto parent = getParentPointer(success);
|
||||||
if (success && parent) {
|
if (success && parent) {
|
||||||
parent->bumpAncestorChainRenderableVersion();
|
parent->bumpAncestorChainRenderableVersion(depth + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -221,7 +221,7 @@ public:
|
||||||
bool hasGrabs();
|
bool hasGrabs();
|
||||||
virtual QUuid getEditSenderID();
|
virtual QUuid getEditSenderID();
|
||||||
|
|
||||||
void bumpAncestorChainRenderableVersion() const;
|
void bumpAncestorChainRenderableVersion(int depth = 0) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QUuid _id;
|
QUuid _id;
|
||||||
|
|
Loading…
Reference in a new issue