w3ts icon indicating copy to clipboard operation
w3ts copied to clipboard

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

Open jejanim opened this issue 4 years ago • 0 comments

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

jejanim avatar Jun 04 '21 15:06 jejanim