From 174fc6147f3426805583b0426846757ed5985100 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 7 Sep 2012 21:22:40 +0200 Subject: check to see if scene exists to prevent array access error for unregistered scenes --- lib/NanoEvent.ck | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') 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; -- cgit v1.2.3