mirror of
				https://github.com/tmux/tmux.git
				synced 2025-10-26 12:27:15 +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:
		| @@ -78,9 +78,10 @@ cmd_display_message_exec(struct cmd *self, struct cmd_q *cmdq) | |||||||
| 	msg = format_expand_time(ft, template, time(NULL)); | 	msg = format_expand_time(ft, template, time(NULL)); | ||||||
| 	if (args_has(self->args, 'p')) | 	if (args_has(self->args, 'p')) | ||||||
| 		cmdq_print(cmdq, "%s", msg); | 		cmdq_print(cmdq, "%s", msg); | ||||||
| 	else | 	else if (c != NULL) | ||||||
| 		status_message_set(c, "%s", msg); | 		status_message_set(c, "%s", msg); | ||||||
| 	free(msg); | 	free(msg); | ||||||
|  |  | ||||||
| 	format_free(ft); | 	format_free(ft); | ||||||
|  |  | ||||||
| 	return (CMD_RETURN_NORMAL); | 	return (CMD_RETURN_NORMAL); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 nicm
					nicm