mirror of https://github.com/tmux/tmux.git
Do not crash if display-message used without a client, issue reported by
Serge Aleynikov, fix from Thomas Adam.pull/523/head
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