From a948a533008d7d80e4f9facdbe77fd3d70e9332a Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 28 May 2021 17:43:42 +0200 Subject: [PATCH] fixup! fsmonitor-ipc: create client routines for git-fsmonitor--daemon If there is no current token, we should not segfault. Such a situation can arise e.g. in an auto-stashing rebase, after the autostash was applied. Signed-off-by: Johannes Schindelin --- fsmonitor-ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsmonitor-ipc.c b/fsmonitor-ipc.c index e62901a85b..a629d34a11 100644 --- a/fsmonitor-ipc.c +++ b/fsmonitor-ipc.c @@ -53,7 +53,7 @@ try_again: switch (state) { case IPC_STATE__LISTENING: ret = ipc_client_send_command_to_connection( - connection, since_token, strlen(since_token), answer); + connection, since_token, since_token ? strlen(since_token) : 0, answer); ipc_client_close_connection(connection); trace2_data_intmax("fsm_client", NULL,