From baa3b51b3e576a07b0bb1abfc8473a678e175b79 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 5 Jan 2026 08:30:30 +0000 Subject: [PATCH] Do not use client if there isn't one, GitHub issue 4789. --- format.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/format.c b/format.c index ec55fc91..6628ef20 100644 --- a/format.c +++ b/format.c @@ -4460,7 +4460,9 @@ format_loop_sessions(struct format_expand_state *es, const char *fmt) for (i = 0; i < n; i++) { s = l[i]; format_log(es, "session loop: $%u", s->id); - if (active != NULL && s->id == ft->c->session->id) + if (active != NULL && + ft->c != NULL && + s->id == ft->c->session->id) use = active; else use = all;