Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3bea0790 authored by Dima Zavin's avatar Dima Zavin
Browse files

init: check for list empty when getting commands for action



Change-Id: Id42d6a6b6297919b2e6520e074e31b5e01ae17bc
Signed-off-by: default avatarDima Zavin <dima@android.com>
parent bb86bc58
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -491,7 +491,7 @@ static struct command *get_first_command(struct action *act)
{
    struct listnode *node;
    node = list_head(&act->commands);
    if (!node)
    if (!node || list_empty(&act->commands))
        return NULL;

    return node_to_item(node, struct command, clist);