peter-kish / gloot

A universal inventory system for the Godot game engine.
MIT License
561 stars 20 forks source link

Bug (Godot 4.3 beta 1): Can't move items in inventory, or from inventory to ItemSlot. #215

Closed LeeWannacott closed 3 months ago

LeeWannacott commented 3 months ago

Moving inventory items results in a crash.

Steps to reproduce: Drag and drop inventory item to a new position inside itself, or a ItemSlot/ other inventory.

Error: image

I think you can check for false instead of null now; from patch notes (https://godotengine.org/article/dev-snapshot-godot-4-3-beta-1/):

Breaking changes:

peter-kish commented 3 months ago

Yeah checking for false would fix the issue in 4.3 beta 1, but I'm afraid it would introduce potential issues in 4.2. So I just went with the is_instance_valid check, which should work in both versions.