if (((ApplicationController *)[NSApplication sharedApplication].delegate).active) {
JSAction *mainAction = [js actionForEvent:value];
[mainAction notifyEvent:value];
- NSArray *children = mainAction.children ? mainAction.children : @[mainAction];
+ NSArray *children = mainAction.children ? mainAction.children : mainAction ? @[mainAction] : @[];
for (JSAction *subaction in children) {
Target *target = [controller.currentConfig getTargetForAction:subaction];
target.magnitude = mainAction.magnitude;