mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 09:11:42 +00:00
[0.4.12][INPUT] Don't race the system to free an imagelist
Fixes CORE-16121
"reproducible heap assertion at 2nd setup stage when
adding additional keyboard layouts"
https://reactos.org/testman/compare.php?ids=68231,68234
cherry-picked from 0.4.13-dev-459-g
f3d1d38041
This commit is contained in:
parent
ec3cc13ab0
commit
e9fb7dcee2
1 changed files with 2 additions and 10 deletions
|
@ -226,7 +226,8 @@ OnInitSettingsPage(HWND hwndDlg)
|
|||
ILC_COLOR8 | ILC_MASK, 0, 0);
|
||||
if (hLayoutImageList != NULL)
|
||||
{
|
||||
ListView_SetImageList(hwndInputList, hLayoutImageList, LVSIL_SMALL);
|
||||
HIMAGELIST hOldImagelist = ListView_SetImageList(hwndInputList, hLayoutImageList, LVSIL_SMALL);
|
||||
ImageList_Destroy(hOldImagelist);
|
||||
}
|
||||
|
||||
UpdateInputListView(hwndInputList);
|
||||
|
@ -239,18 +240,9 @@ OnInitSettingsPage(HWND hwndDlg)
|
|||
static VOID
|
||||
OnDestroySettingsPage(HWND hwndDlg)
|
||||
{
|
||||
HIMAGELIST hImageList;
|
||||
|
||||
LayoutList_Destroy();
|
||||
LocaleList_Destroy();
|
||||
InputList_Destroy();
|
||||
|
||||
hImageList = ListView_GetImageList(GetDlgItem(hwndDlg, IDC_KEYLAYOUT_LIST),
|
||||
LVSIL_SMALL);
|
||||
if (hImageList != NULL)
|
||||
{
|
||||
ImageList_Destroy(hImageList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue