File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,8 @@ OnInitSettingsPage(HWND hwndDlg)
226
226
ILC_COLOR8 | ILC_MASK , 0 , 0 );
227
227
if (hLayoutImageList != NULL )
228
228
{
229
- ListView_SetImageList (hwndInputList , hLayoutImageList , LVSIL_SMALL );
229
+ HIMAGELIST hOldImagelist = ListView_SetImageList (hwndInputList , hLayoutImageList , LVSIL_SMALL );
230
+ ImageList_Destroy (hOldImagelist );
230
231
}
231
232
232
233
UpdateInputListView (hwndInputList );
@@ -239,18 +240,9 @@ OnInitSettingsPage(HWND hwndDlg)
239
240
static VOID
240
241
OnDestroySettingsPage (HWND hwndDlg )
241
242
{
242
- HIMAGELIST hImageList ;
243
-
244
243
LayoutList_Destroy ();
245
244
LocaleList_Destroy ();
246
245
InputList_Destroy ();
247
-
248
- hImageList = ListView_GetImageList (GetDlgItem (hwndDlg , IDC_KEYLAYOUT_LIST ),
249
- LVSIL_SMALL );
250
- if (hImageList != NULL )
251
- {
252
- ImageList_Destroy (hImageList );
253
- }
254
246
}
255
247
256
248
You can’t perform that action at this time.
0 commit comments