mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Windows: initialise window_name and icon_name.
It turns out that they're still NULL at the first moment that a SetWindowText call tries to read one of them, because they weren't initialised at startup! Apparently SetWindowText notices that it's been passed a null pointer, and does nothing in preference to failing, but it's still not what I _meant_ to do.
This commit is contained in:
parent
fe00a2928c
commit
901667280a
@ -563,6 +563,8 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
|
|||||||
if (vt && vt->flags & BACKEND_RESIZE_FORBIDDEN)
|
if (vt && vt->flags & BACKEND_RESIZE_FORBIDDEN)
|
||||||
resize_forbidden = true;
|
resize_forbidden = true;
|
||||||
wchar_t *uappname = dup_mb_to_wc(DEFAULT_CODEPAGE, 0, appname);
|
wchar_t *uappname = dup_mb_to_wc(DEFAULT_CODEPAGE, 0, appname);
|
||||||
|
window_name = dup_mb_to_wc(DEFAULT_CODEPAGE, 0, appname);
|
||||||
|
icon_name = dup_mb_to_wc(DEFAULT_CODEPAGE, 0, appname);
|
||||||
if (!conf_get_bool(conf, CONF_scrollbar))
|
if (!conf_get_bool(conf, CONF_scrollbar))
|
||||||
winmode &= ~(WS_VSCROLL);
|
winmode &= ~(WS_VSCROLL);
|
||||||
if (conf_get_int(conf, CONF_resize_action) == RESIZE_DISABLED ||
|
if (conf_get_int(conf, CONF_resize_action) == RESIZE_DISABLED ||
|
||||||
|
Loading…
Reference in New Issue
Block a user