From: jacob Date: Mon, 21 Mar 2005 22:20:22 +0000 (+0000) Subject: Hung-Te Lin spotted that the `multi-changesettings-crash' workaround for Windows X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/68a66cc3d87cffc334910400fd6da10ea44244b6 Hung-Te Lin spotted that the `multi-changesettings-crash' workaround for Windows would prevent a user opening Change Settings if they'd cancelled a previous Change Settings. git-svn-id: svn://svn.tartarus.org/sgt/putty@5539 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/windows/window.c b/windows/window.c index fedcc359..e6c0e395 100644 --- a/windows/window.c +++ b/windows/window.c @@ -108,7 +108,7 @@ static void *backhandle; static struct unicode_data ucsdata; static int session_closed; -static int reconfiguring; +static int reconfiguring = FALSE; static const struct telnet_special *specials; static int n_specials; @@ -1968,16 +1968,20 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, { Config prev_cfg; int init_lvl = 1; + int reconfig_result; if (reconfiguring) - break; + break; else - reconfiguring = TRUE; + reconfiguring = TRUE; GetWindowText(hwnd, cfg.wintitle, sizeof(cfg.wintitle)); prev_cfg = cfg; - if (!do_reconfig(hwnd, back ? back->cfg_info(backhandle) : 0)) + reconfig_result = + !do_reconfig(hwnd, back ? back->cfg_info(backhandle) : 0); + reconfiguring = FALSE; + if (!reconfig_result) break; { @@ -2110,7 +2114,6 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, InvalidateRect(hwnd, NULL, TRUE); reset_window(init_lvl); net_pending_errors(); - reconfiguring = FALSE; } break; case IDM_COPYALL: