mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 20:50:29 +00:00
[OSK] fix resource leak in error case CID 1322148
svn path=/trunk/; revision=68931
This commit is contained in:
parent
349dd3bfe4
commit
0b74f9e65e
1 changed files with 7 additions and 2 deletions
|
@ -40,10 +40,15 @@ int OSK_SetImage(int IdDlgItem, int IdResource)
|
|||
|
||||
hIcon = (HICON)LoadImage(Globals.hInstance, MAKEINTRESOURCE(IdResource),
|
||||
IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
|
||||
if (hIcon == NULL) return FALSE;
|
||||
if (hIcon == NULL)
|
||||
return FALSE;
|
||||
|
||||
hWndItem = GetDlgItem(Globals.hMainWnd, IdDlgItem);
|
||||
if (hWndItem == NULL) return FALSE;
|
||||
if (hWndItem == NULL)
|
||||
{
|
||||
DestroyIcon(hIcon);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SendMessage(hWndItem, BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
|
||||
|
||||
|
|
Loading…
Reference in a new issue