mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 19:07:51 +02:00
Fix crash when adding a tracked entity to the safe landing code
when it's not been fully set up yet.
This commit is contained in:
parent
39d32025a3
commit
bad421cb59
1 changed files with 5 additions and 0 deletions
|
@ -71,6 +71,11 @@ void SafeLanding::stopEntitySequence() {
|
|||
void SafeLanding::addTrackedEntity(const EntityItemID& entityID) {
|
||||
if (_trackingEntities) {
|
||||
Locker lock(_lock);
|
||||
|
||||
if (_entityTreeRenderer.isNull() || _entityTreeRenderer->getTree() == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
EntityItemPointer entity = _entityTreeRenderer->getTree()->findEntityByID(entityID);
|
||||
|
||||
if (entity && !entity->isLocalEntity() && entity->getCreated() < _startTime) {
|
||||
|
|
Loading…
Reference in a new issue