[REACTOS] Do not free shared icon for ShellAbout() calls (#5519)

CORE-18369
This commit is contained in:
Serge Gautherie 2023-08-09 11:53:13 +02:00 committed by GitHub
parent 815d55c378
commit 016acd170d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 25 additions and 52 deletions

View file

@ -1945,9 +1945,9 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdL
hInstance,
MAKEINTRESOURCE(IDI_CALC),
IMAGE_ICON,
GetSystemMetrics(SM_CXICON),
GetSystemMetrics(SM_CYICON),
0);
0,
0,
LR_DEFAULTSIZE | LR_SHARED);
calc.hSmIcon = LoadImage(
hInstance,
@ -1955,7 +1955,7 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdL
IMAGE_ICON,
GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON),
0);
LR_SHARED);
do {
/* ignore hwnd: dialogs are already visible! */
@ -1985,12 +1985,6 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdL
save_config();
} while (calc.action != IDC_STATIC);
if (calc.hBgIcon != NULL)
DestroyIcon(calc.hBgIcon);
if (calc.hSmIcon != NULL)
DestroyIcon(calc.hSmIcon);
stop_rpn_engine();
Theme_Stop();