diff options
| author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-09-07 21:22:40 +0200 |
|---|---|---|
| committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-09-07 21:22:40 +0200 |
| commit | 174fc6147f3426805583b0426846757ed5985100 (patch) | |
| tree | bb83b38e4e01a0e15b05986890f9a442e4100913 | |
| parent | f03fc538d5762ed5b540d4d21438d6aafa0a6fb8 (diff) | |
| download | digitale-debutanten-174fc6147f3426805583b0426846757ed5985100.tar.gz | |
check to see if scene exists to prevent array access error for unregistered scenes
| -rw-r--r-- | lib/NanoEvent.ck | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/NanoEvent.ck b/lib/NanoEvent.ck index 17dec49..6699d96 100644 --- a/lib/NanoEvent.ck +++ b/lib/NanoEvent.ck @@ -79,7 +79,10 @@ public class NanoEvent extends Event { msg.data1 & 0xF0 => int cmd; msg.data2 => CCId; - __controlToName[scene][CCId] @=> control; + if (__controlToName[scene] != null) + __controlToName[scene][CCId] @=> control; + else + "" @=> control; if (control == "") { <<< "Unknown controller", CCId >>>; CCId => Std.itoa @=> control; |
