mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[INPUT] Don't race the system to free an imagelist
This commit is contained in:
parent
939b25a15a
commit
f3d1d38041
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…
Reference in a new issue