Skip to content

Commit

Permalink
Merge pull request CleverRaven#76058 from HadeanLake/seg1
Browse files Browse the repository at this point in the history
Fixed segfault when monster tries to grab-drag another monster out of reality bubble
  • Loading branch information
akrieger authored Aug 30, 2024
2 parents b325a47 + 9205a31 commit 13f5534
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/mattack_actors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,6 @@ int melee_actor::do_grab( monster &z, Creature *target, bodypart_id bp_id ) cons
std::set<tripoint> intersect;
std::set_intersection( neighbors.begin(), neighbors.end(), candidates.begin(), candidates.end(),
std::inserter( intersect, intersect.begin() ) );
std::set<tripoint>::iterator intersect_iter = intersect.begin();
std::advance( intersect_iter, rng( 0, intersect.size() - 1 ) );
tripoint target_square = random_entry<std::set<tripoint>>( intersect );
if( z.can_move_to( target_square ) ) {
monster *zz = target->as_monster();
Expand Down

0 comments on commit 13f5534

Please sign in to comment.