Skip to content
Permalink
Browse files

Add missing sao->isGone() checks

fixes #9883
  • Loading branch information
sfan5 committed May 18, 2020
1 parent 11723cf commit 0fc51db7722f9aa1e0aa2dacade6041c932b0731
Showing with 4 additions and 1 deletion.
  1. +2 −1 src/collision.cpp
  2. +2 −0 src/serverenvironment.cpp
@@ -397,7 +397,8 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
// we directly use the callback to populate the result to prevent
// a useless result loop here
auto include_obj_cb = [self, &objects] (ServerActiveObject *obj) {
if (!self || (self != obj && self != obj->getParent())) {
if (!obj->isGone() &&

This comment has been minimized.

Copy link
@SmallJoker

SmallJoker May 19, 2020

Member

Optimally that would be included in getObjectsInsideRadius directly.

(!self || (self != obj && self != obj->getParent()))) {
objects.push_back((ActiveObject *)obj);
}
return false;
@@ -1623,6 +1623,8 @@ void ServerEnvironment::getSelectedActiveObjects(
const v3f line_vector = shootline_on_map.getVector();

for (auto obj : objs) {
if (obj->isGone())
continue;
aabb3f selection_box;
if (!obj->getSelectionBox(&selection_box))
continue;

0 comments on commit 0fc51db

Please sign in to comment.
You can’t perform that action at this time.