Skip to content

Missing null/instance checks in _on_collided #2

Description

@TechLuddite

Summary

_on_collided assumes a live body and a non-null placable.slotData.itemData.type chain. There is no is_instance_valid(body) and no null guards.

Risk

An exception here can happen before skip_super() on the happy path, crashing the hook or falling through to vanilla drop behavior unexpectedly.

Suggested fix

  • Guard with is_instance_valid(body) and null-check the slot/item data chain before use.
  • Consider ordering so a failure does not leave the item in an inconsistent state.

Related: #1

— 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