From 8284197899404d7873383856a1ba581ae4199683 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 5 Jan 2023 21:01:02 +0100 Subject: [PATCH] handle deleted token --- src/playermat/Playmat.ttslua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/playermat/Playmat.ttslua b/src/playermat/Playmat.ttslua index e19e6c26..47bd0e17 100644 --- a/src/playermat/Playmat.ttslua +++ b/src/playermat/Playmat.ttslua @@ -600,7 +600,9 @@ function maybeUpdateActiveInvestigator(card) ["08016"] = 14 -- Bob Jenkins } - setObjectState(smallToken, SPECIAL_ACTIONS[activeInvestigatorId] or STATE_TABLE[class]) + if smallToken ~= nil then + setObjectState(smallToken, SPECIAL_ACTIONS[activeInvestigatorId] or STATE_TABLE[class]) + end end function setObjectState(obj, stateId)