Commit a11b8ded authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

winecfg: Fix a crash on empty size field in Desktop Integration.

parent 19cb98aa
......@@ -1214,8 +1214,17 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
int index = SendDlgItemMessageW(hDlg, IDC_SYSPARAM_COMBO, CB_GETCURSEL, 0, 0);
index = SendDlgItemMessageW(hDlg, IDC_SYSPARAM_COMBO, CB_GETITEMDATA, index, 0);
metrics[index].size = atoi(text);
HeapFree(GetProcessHeap(), 0, text);
if (text)
{
metrics[index].size = atoi(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);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment