1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-18 03:28:07 -05:00

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.

[originally from svn r5539]
This commit is contained in:
Jacob Nevins 2005-03-21 22:20:22 +00:00
parent dcc4ffbd34
commit 5b695d81ad

View File

@ -108,7 +108,7 @@ static void *backhandle;
static struct unicode_data ucsdata; static struct unicode_data ucsdata;
static int session_closed; static int session_closed;
static int reconfiguring; static int reconfiguring = FALSE;
static const struct telnet_special *specials; static const struct telnet_special *specials;
static int n_specials; static int n_specials;
@ -1968,16 +1968,20 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
{ {
Config prev_cfg; Config prev_cfg;
int init_lvl = 1; int init_lvl = 1;
int reconfig_result;
if (reconfiguring) if (reconfiguring)
break; break;
else else
reconfiguring = TRUE; reconfiguring = TRUE;
GetWindowText(hwnd, cfg.wintitle, sizeof(cfg.wintitle)); GetWindowText(hwnd, cfg.wintitle, sizeof(cfg.wintitle));
prev_cfg = cfg; 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; break;
{ {
@ -2110,7 +2114,6 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
InvalidateRect(hwnd, NULL, TRUE); InvalidateRect(hwnd, NULL, TRUE);
reset_window(init_lvl); reset_window(init_lvl);
net_pending_errors(); net_pending_errors();
reconfiguring = FALSE;
} }
break; break;
case IDM_COPYALL: case IDM_COPYALL: