From bad421cb59a6b6de53737d8e6a58c432d4380530 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Tue, 21 May 2019 16:58:49 -0700 Subject: [PATCH] Fix crash when adding a tracked entity to the safe landing code when it's not been fully set up yet. --- interface/src/octree/SafeLanding.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/interface/src/octree/SafeLanding.cpp b/interface/src/octree/SafeLanding.cpp index de552b7b84..2e11de508b 100644 --- a/interface/src/octree/SafeLanding.cpp +++ b/interface/src/octree/SafeLanding.cpp @@ -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) {