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:
Shannon Romano 2019-05-21 19:38:01 -07:00 committed by GitHub
commit 930018a924
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {