From b5848f38b4a5a8831c12b7b4d5a21d1f745355b4 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Tue, 16 Dec 2025 11:57:56 +0800 Subject: [PATCH] fix: crash when use focusstack --- src/fetch/client.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fetch/client.h b/src/fetch/client.h index 0bc8488..e31e89d 100644 --- a/src/fetch/client.h +++ b/src/fetch/client.h @@ -393,8 +393,8 @@ Client *get_next_stack_client(Client *c, bool reverse) { Client *next = NULL; if (reverse) { wl_list_for_each_reverse(next, &c->link, link) { - if (!next) - continue; // 安全检查 + if (&next->link == &clients) + continue; /* wrap past the sentinel node */ if (c->mon->has_visible_fullscreen_client && !next->isfloating && !next->isfullscreen) @@ -406,8 +406,8 @@ Client *get_next_stack_client(Client *c, bool reverse) { } } else { wl_list_for_each(next, &c->link, link) { - if (!next) - continue; // 安全检查 + if (&next->link == &clients) + continue; /* wrap past the sentinel node */ if (c->mon->has_visible_fullscreen_client && !next->isfloating && !next->isfullscreen)