From 1d1728e82e252ae710c514ed2d71a627087b6f6e Mon Sep 17 00:00:00 2001 From: Silvris <58583688+Silvris@users.noreply.github.com> Date: Mon, 29 Apr 2024 20:58:18 -0500 Subject: [PATCH] fix rare async client bug --- worlds/kdl3/Client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/kdl3/Client.py b/worlds/kdl3/Client.py index 601ccab91e..f6bf4f854f 100644 --- a/worlds/kdl3/Client.py +++ b/worlds/kdl3/Client.py @@ -170,7 +170,7 @@ class KDL3SNIClient(SNIClient): self.item_queue.append(item) # no more slots, get it next go around async def pop_gift(self, ctx): - if ctx.stored_data[self.giftbox_key]: + if self.giftbox_key in ctx.stored_data and ctx.stored_data[self.giftbox_key]: from SNIClient import snes_read, snes_buffered_write key, gift = ctx.stored_data[self.giftbox_key].popitem() await pop_object(ctx, self.giftbox_key, key)