mirror of
https://github.com/tmux/tmux.git
synced 2026-10-06 17:49:52 +00:00
Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master: Add NULL checks for clients that may not have identified yet, GitHub issue 5663.
This commit is contained in:
8
format.c
8
format.c
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: format.c,v 1.423 2026/09/29 13:59:10 nicm Exp $ */
|
||||
/* $OpenBSD: format.c,v 1.424 2026/09/29 14:12:21 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -1644,7 +1644,7 @@ format_cb_client_last_session(struct format_tree *ft)
|
||||
static void *
|
||||
format_cb_client_name(struct format_tree *ft)
|
||||
{
|
||||
if (ft->c != NULL)
|
||||
if (ft->c != NULL && ft->c->name != NULL)
|
||||
return (xstrdup(ft->c->name));
|
||||
return (NULL);
|
||||
}
|
||||
@@ -1707,7 +1707,7 @@ format_cb_client_termfeatures(struct format_tree *ft)
|
||||
static void *
|
||||
format_cb_client_termname(struct format_tree *ft)
|
||||
{
|
||||
if (ft->c != NULL)
|
||||
if (ft->c != NULL && ft->c->term_name != NULL)
|
||||
return (xstrdup(ft->c->term_name));
|
||||
return (NULL);
|
||||
}
|
||||
@@ -1728,7 +1728,7 @@ format_cb_client_termtype(struct format_tree *ft)
|
||||
static void *
|
||||
format_cb_client_tty(struct format_tree *ft)
|
||||
{
|
||||
if (ft->c != NULL)
|
||||
if (ft->c != NULL && ft->c->ttyname != NULL)
|
||||
return (xstrdup(ft->c->ttyname));
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user