diff --git a/sched/signal/sig_action.c b/sched/signal/sig_action.c index c3064292f5..731ff9c70c 100644 --- a/sched/signal/sig_action.c +++ b/sched/signal/sig_action.c @@ -238,9 +238,17 @@ int nxsig_action(int signo, FAR const struct sigaction *act, * execution, no special precautions should be necessary. */ - DEBUGASSERT(rtcb != NULL && rtcb->group != NULL); + DEBUGASSERT(rtcb != NULL); + group = rtcb->group; + /* If the value of group is null, the task may have exited */ + + if (group == NULL) + { + return -EINVAL; + } + /* Verify the signal number */ if (!GOOD_SIGNO(signo))