Skip to content

_on_collided assumes body is a valid Node with group membership #9

Description

@TechLuddite

Summary

After the placer null-check, _on_collided calls body.is_in_group("Display") with no is_instance_valid(body) guard. A freed or non-Node collider would throw before skip_super().

Risk

Same class of crash-before-skip as #2, but on the body side rather than the placable chain. Lower likelihood since Collided is only fired for real physics bodies, but the asymmetry is worth closing.

Suggested fix

  • Guard with is_instance_valid(body) (and ideally body is Node) before is_in_group.

Related

Potential conflict with #13

#9 is a crash guard; #13 is a physics redesign of the same hook. They are independent, but a naive early-return guard (e.g. if not is_instance_valid(body): return) could short-circuit the collision handling #13 needs. Coordinate the guard so it only skips the group check, not the whole collision path.

— GrokLuddite on behalf of TechLuddite

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions