mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 20:56:52 +02:00
Merge pull request #15603 from roxanneskelly/bugz223
BUGZ-223 - Fix crash when adding a tracked entity to the safe landing code
This commit is contained in:
commit
930018a924
1 changed files with 5 additions and 0 deletions
|
@ -71,6 +71,11 @@ void SafeLanding::stopEntitySequence() {
|
||||||
void SafeLanding::addTrackedEntity(const EntityItemID& entityID) {
|
void SafeLanding::addTrackedEntity(const EntityItemID& entityID) {
|
||||||
if (_trackingEntities) {
|
if (_trackingEntities) {
|
||||||
Locker lock(_lock);
|
Locker lock(_lock);
|
||||||
|
|
||||||
|
if (_entityTreeRenderer.isNull() || _entityTreeRenderer->getTree() == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
EntityItemPointer entity = _entityTreeRenderer->getTree()->findEntityByID(entityID);
|
EntityItemPointer entity = _entityTreeRenderer->getTree()->findEntityByID(entityID);
|
||||||
|
|
||||||
if (entity && !entity->isLocalEntity() && entity->getCreated() < _startTime) {
|
if (entity && !entity->isLocalEntity() && entity->getCreated() < _startTime) {
|
||||||
|
|
Loading…
Reference in a new issue