mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 04:10:04 +00:00
winecfg: Fix a crash on empty size field in Desktop Integration.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
19cb98aa1d
commit
a11b8ded1d
@ -1214,8 +1214,17 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
int index = SendDlgItemMessageW(hDlg, IDC_SYSPARAM_COMBO, CB_GETCURSEL, 0, 0);
|
int index = SendDlgItemMessageW(hDlg, IDC_SYSPARAM_COMBO, CB_GETCURSEL, 0, 0);
|
||||||
|
|
||||||
index = SendDlgItemMessageW(hDlg, IDC_SYSPARAM_COMBO, CB_GETITEMDATA, index, 0);
|
index = SendDlgItemMessageW(hDlg, IDC_SYSPARAM_COMBO, CB_GETITEMDATA, index, 0);
|
||||||
|
|
||||||
|
if (text)
|
||||||
|
{
|
||||||
metrics[index].size = atoi(text);
|
metrics[index].size = atoi(text);
|
||||||
HeapFree(GetProcessHeap(), 0, text);
|
HeapFree(GetProcessHeap(), 0, text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* for empty string set to minimum value */
|
||||||
|
SendDlgItemMessageW(hDlg, IDC_SYSPARAM_SIZE_UD, UDM_GETRANGE32, (WPARAM)&metrics[index].size, 0);
|
||||||
|
}
|
||||||
|
|
||||||
SendMessageW(GetParent(hDlg), PSM_CHANGED, 0, 0);
|
SendMessageW(GetParent(hDlg), PSM_CHANGED, 0, 0);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user