mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Windows: diagnose failure to create the terminal window.
It only fails in very unusual circumstances, but that's all the more reason to give a useful report when it does!
This commit is contained in:
parent
cf41bc0c62
commit
fe00a2928c
@ -575,6 +575,10 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
|
|||||||
wgs.term_hwnd = CreateWindowExW(
|
wgs.term_hwnd = CreateWindowExW(
|
||||||
exwinmode, uappname, uappname, winmode, CW_USEDEFAULT,
|
exwinmode, uappname, uappname, winmode, CW_USEDEFAULT,
|
||||||
CW_USEDEFAULT, guess_width, guess_height, NULL, NULL, inst, NULL);
|
CW_USEDEFAULT, guess_width, guess_height, NULL, NULL, inst, NULL);
|
||||||
|
if (!wgs.term_hwnd) {
|
||||||
|
modalfatalbox("Unable to create terminal window: %s",
|
||||||
|
win_strerror(GetLastError()));
|
||||||
|
}
|
||||||
memset(&dpi_info, 0, sizeof(struct _dpi_info));
|
memset(&dpi_info, 0, sizeof(struct _dpi_info));
|
||||||
init_dpi_info();
|
init_dpi_info();
|
||||||
sfree(uappname);
|
sfree(uappname);
|
||||||
|
Loading…
Reference in New Issue
Block a user