From 8f7748082b86f468995c27cc809cbf135dbe56c5 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 16 Sep 2022 09:18:52 +0100 Subject: [PATCH] WinGuiSeat refactoring: fix a missing context parameter. Of the three calls to queue_toplevel_callback in window.c, one of them was still passing NULL as its context parameter, rather than the new 'wgs'. As a result, a segfault could occur during some session closures. --- windows/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/window.c b/windows/window.c index d64552dd..82bbe8e6 100644 --- a/windows/window.c +++ b/windows/window.c @@ -2073,7 +2073,7 @@ static void exit_callback(void *vctx) (close_on_exit == AUTO && exitcode != INT_MAX)) { PostQuitMessage(0); } else { - queue_toplevel_callback(close_session, NULL); + queue_toplevel_callback(close_session, wgs); wgs->session_closed = true; /* exitcode == INT_MAX indicates that the connection was closed * by a fatal error, so an error box will be coming our way and