X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/7628982b9127d1e71e4c0536eb9f4aef3d02c42e..4f1aa9a9cacee7dffea752607b5ad6c254f3e28b:/windows/window.c diff --git a/windows/window.c b/windows/window.c index f721ed97..c8c2b56d 100644 --- a/windows/window.c +++ b/windows/window.c @@ -311,6 +311,15 @@ static void close_session(void) InsertMenu(popup_menus[i].menu, IDM_DUPSESS, MF_BYCOMMAND | MF_ENABLED, IDM_RESTART, "&Restart Session"); } + + /* + * Unset the 'must_close_session' flag, or else we'll come + * straight back here the next time we go round the main message + * loop - which, worse still, will be immediately (without + * blocking) because we've just triggered a WM_SETTEXT by the + * window title change above. + */ + must_close_session = FALSE; } int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)