Merge pull request #591 from Ragora/bugfix-object-deletion-crash

* BugFix: Fix a crash that sometimes occurs when groups of of objects are deleted
This commit is contained in:
Jeff Hutchinson 2021-09-24 23:28:15 -04:00 committed by GitHub
commit e35b5f5119
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1993,12 +1993,12 @@ void WorldEditor::on3DMouseMove(const Gui3DMouseEvent & event)
if ( !mHitObject )
{
SceneObject *hitObj = NULL;
if ( collide(event, &hitObj) && hitObj->isSelectionEnabled() && !objClassIgnored(hitObj) )
if ( collide(event, &hitObj) && !hitObj->isDeleted() && hitObj->isSelectionEnabled() && !objClassIgnored(hitObj) )
{
mHitObject = hitObj;
}
}
mLastMouseEvent = event;
}