From af27ea633d45d8027b8bc87d40141fb4bf3a5974 Mon Sep 17 00:00:00 2001 From: Tristan Rowley Date: Fri, 31 Jan 2020 18:56:41 +0000 Subject: [PATCH] fix for crash when using keypad to turn shaders on (no previous state stored invalid key) --- plugins/MidiFeedbackAPCKey25Plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/MidiFeedbackAPCKey25Plugin.py b/plugins/MidiFeedbackAPCKey25Plugin.py index f393eb4..1315ad3 100644 --- a/plugins/MidiFeedbackAPCKey25Plugin.py +++ b/plugins/MidiFeedbackAPCKey25Plugin.py @@ -225,7 +225,7 @@ class MidiFeedbackAPCKey25Plugin(MidiFeedbackPlugin): #print("in update device status is %s" % self.status) for i,c in self.status.items(): #'print("comparing\n%s to\n%s" % (c, self.last_state[i])) - if self.last_state is None or self.last_state[i]!=c: + if self.last_state is None or (i not in self.last_state or self.last_state[i]!=c): #print("got command: %s: %s" % (i,c)) self.send_command(**c) self.last_state = deepcopy(self.status)