summaryrefslogtreecommitdiff
path: root/switchctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'switchctl.c')
-rw-r--r--switchctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/switchctl.c b/switchctl.c
index 97202b7..cb54077 100644
--- a/switchctl.c
+++ b/switchctl.c
@@ -795,7 +795,8 @@ int main_loop(int switch_fd, int cmd_listen_fd, options_t* opt)
break;
}
- lst = lst->next;
+ if(lst)
+ lst = lst->next;
}
if(cmd_q && !cmd_q->sent)