Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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