mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Do not crash if display-message used without a client, issue reported by
Serge Aleynikov, fix from Thomas Adam.
This commit is contained in:
parent
43f292b2e0
commit
6bf033beae
@ -78,9 +78,10 @@ cmd_display_message_exec(struct cmd *self, struct cmd_q *cmdq)
|
||||
msg = format_expand_time(ft, template, time(NULL));
|
||||
if (args_has(self->args, 'p'))
|
||||
cmdq_print(cmdq, "%s", msg);
|
||||
else
|
||||
else if (c != NULL)
|
||||
status_message_set(c, "%s", msg);
|
||||
free(msg);
|
||||
|
||||
format_free(ft);
|
||||
|
||||
return (CMD_RETURN_NORMAL);
|
||||
|
Loading…
Reference in New Issue
Block a user