1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-10 15:48:06 -05:00

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.
This commit is contained in:
Simon Tatham 2022-09-16 09:18:52 +01:00
parent c780cffb7a
commit 8f7748082b

View File

@ -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