From f74501e97e2974855113c179ec97975166ac568e Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 27 Feb 2026 19:36:47 +0100 Subject: [PATCH] cleanup: add a defensive check in cmd_process_input() --- src/command/cmd_funcs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 383cde81..bfdf636e 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -154,6 +154,9 @@ cmd_process_input(ProfWin* window, char* inp) if (inp[0] == '/') { auto_char char* inp_cpy = strdup(inp); char* command = strtok(inp_cpy, " "); + if (!command) { + return TRUE; + } char* question_mark = strchr(command, '?'); if (question_mark) { *question_mark = '\0';