mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 09:12:24 +00:00
Don't call DestroyIcon(INVALID_HANDLE_VALUE).
The Windows API documentation doesn't explicitly say this is safe, and
ea32967044
didn't take care over it.
This commit is contained in:
parent
efff6b874a
commit
9366a1b4d8
@ -1665,7 +1665,9 @@ static void init_fonts(int pick_width, int pick_height)
|
|||||||
|
|
||||||
ReleaseDC(hwnd, hdc);
|
ReleaseDC(hwnd, hdc);
|
||||||
|
|
||||||
DestroyIcon(trust_icon);
|
if (trust_icon != INVALID_HANDLE_VALUE) {
|
||||||
|
DestroyIcon(trust_icon);
|
||||||
|
}
|
||||||
trust_icon = LoadImage(hinst, MAKEINTRESOURCE(IDI_MAINICON),
|
trust_icon = LoadImage(hinst, MAKEINTRESOURCE(IDI_MAINICON),
|
||||||
IMAGE_ICON, font_width*2, font_height,
|
IMAGE_ICON, font_width*2, font_height,
|
||||||
LR_DEFAULTCOLOR);
|
LR_DEFAULTCOLOR);
|
||||||
@ -1753,7 +1755,9 @@ static void deinit_fonts(void)
|
|||||||
fontflag[i] = false;
|
fontflag[i] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
DestroyIcon(trust_icon);
|
if (trust_icon != INVALID_HANDLE_VALUE) {
|
||||||
|
DestroyIcon(trust_icon);
|
||||||
|
}
|
||||||
trust_icon = INVALID_HANDLE_VALUE;
|
trust_icon = INVALID_HANDLE_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user