From 2e5484d97bc6c06371e3329aed5a4f4070291fb2 Mon Sep 17 00:00:00 2001 From: Buhallin Date: Mon, 16 Jan 2023 02:12:23 -0800 Subject: [PATCH] Fix check for missing metadata in PlayArea onObjectPickup --- src/core/PlayArea.ttslua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/PlayArea.ttslua b/src/core/PlayArea.ttslua index 3640265e..ad422fae 100644 --- a/src/core/PlayArea.ttslua +++ b/src/core/PlayArea.ttslua @@ -140,7 +140,7 @@ function onObjectPickUp(player, object) -- should be tracking if showLocationLinks() and isInPlayArea(object) and object.getGMNotes() ~= nil and object.getGMNotes() ~= "" then local pickedUpGuid = object.getGUID() - local metadata = JSON.decode(object.getGMNotes()) + local metadata = JSON.decode(object.getGMNotes()) or { } if (metadata.type == "Location") then -- onCollisionExit sometimes comes 1 frame after onObjectPickUp (rather than before it or in -- the same frame). This causes a mismatch in the data between dragging the on-table, and