for (unsigned i = 0; i < nActs; i++) {
union xkb_action *toAct = &darray_item(groupi->levels, i).action;
- if (!HandleActionDef(info->ctx, info->actions, &info->mods, act, toAct))
- log_err(info->ctx,
- XKB_ERROR_INVALID_VALUE,
- "Illegal action definition for %s; "
- "Action for group %u/level %u ignored\n",
- KeyInfoText(info, keyi), ndx + 1, i + 1);
+ if (act) {
+ if (!HandleActionDef(info->ctx, info->actions, &info->mods, act, toAct))
+ log_err(info->ctx,
+ "Illegal action definition for %s; "
+ "Action for group %u/level %u ignored\n",
+ KeyInfoText(info, keyi), ndx + 1, i + 1);
- act = (ExprDef *) act->common.next;
+ act = (ExprDef *) act->common.next;
+ }
}
return true;