Skip to content

Unit.getItemInSlot() crashes if the slot is empty. #31

@jejanim

Description

@jejanim

I recently updated from 2.1.3 and noticed that when calling Unit.getItemInSlot() on an empty inventory slot, the call crashes. I expect this to have something to do with the change that made this function return an instance of Item instead of a handle.

Is this behavior intended?
The only way to circumvent this now is a try/catch block.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions