diff options
author | tpart <tpart120@proton.me> | 2024-09-25 16:09:08 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2024-09-25 16:09:20 +0200 |
commit | c05c39a5818811518494c69f1c2909185e9719c7 (patch) | |
tree | 09ae16138535cbacf71142fb9a5bb35f6bb88482 | |
parent | cea8b52bc34e5df49e2ded3de742b928ad0671c3 (diff) | |
download | hurrycurry-c05c39a5818811518494c69f1c2909185e9719c7.tar hurrycurry-c05c39a5818811518494c69f1c2909185e9719c7.tar.bz2 hurrycurry-c05c39a5818811518494c69f1c2909185e9719c7.tar.zst |
Fix crash if clear_item called multilpe times
-rw-r--r-- | client/menu/communicate/popup_message/pinned_item_messages.gd | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/menu/communicate/popup_message/pinned_item_messages.gd b/client/menu/communicate/popup_message/pinned_item_messages.gd index e4507fa7..3d7df81e 100644 --- a/client/menu/communicate/popup_message/pinned_item_messages.gd +++ b/client/menu/communicate/popup_message/pinned_item_messages.gd @@ -37,4 +37,5 @@ func pin_item(item_name: String, timeout_initial_: float, timeout_remaining_: fl func clear_item(player_id: float): if player_id in pinned_items: - pinned_items[player_id].queue_free() + if is_instance_valid(pinned_items[player_id]): + pinned_items[player_id].queue_free() |