mirror of
https://github.com/tmux/tmux.git
synced 2026-06-20 09:25:12 +00:00
Do not dereference the current window if it is NULL (can be if the
notification fires after session is destroyed). GitHub issue 5244 from Ben Maurer.
This commit is contained in:
@@ -224,6 +224,14 @@ control_notify_session_window_changed(struct session *s)
|
|||||||
{
|
{
|
||||||
struct client *c;
|
struct client *c;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* A deferred session-window-changed notification can fire after the
|
||||||
|
* session has been destroyed (which sets curw to NULL) but is kept
|
||||||
|
* alive by the notification's reference. Skip the notification.
|
||||||
|
*/
|
||||||
|
if (s->curw == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
TAILQ_FOREACH(c, &clients, entry) {
|
TAILQ_FOREACH(c, &clients, entry) {
|
||||||
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c))
|
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user