X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/06c3eadd0e2c2fa768242ef84d3e088255363b83..85aa0836a099c76f5398fa8d3f0128c28d083a80:/windows/window.c diff --git a/windows/window.c b/windows/window.c index 824827a7..b7561cf2 100644 --- a/windows/window.c +++ b/windows/window.c @@ -299,6 +299,7 @@ static void close_session(void) back->free(backhandle); backhandle = NULL; back = NULL; + term_provide_resize_fn(term, NULL, NULL); update_specials_menu(NULL); } @@ -538,7 +539,8 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) cmdline_run_saved(&cfg); - if (!cfg_launchable(&cfg) && !do_config()) { + if ((!loaded_session || !cfg_launchable(&cfg)) && + !do_config()) { cleanup_exit(0); } @@ -815,9 +817,8 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) sfree(handles); if (must_close_session) close_session(); - } - - sfree(handles); + } else + sfree(handles); while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { if (msg.message == WM_QUIT)