[COMCTL32] Check for NULL pointer when handling BCM_GETIDEALSIZE.

Fixes crash in comctl32_winetest:button.
This commit is contained in:
Thomas Faber 2019-02-03 16:55:04 +01:00
parent 3445129dd3
commit 8dcdf82e71
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

View file

@ -941,6 +941,11 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
BOOL ret = FALSE;
SIZE* pSize = (SIZE*)lParam;
if (!pSize)
{
return FALSE;
}
if (btn_type == BS_PUSHBUTTON ||
btn_type == BS_DEFPUSHBUTTON ||
btn_type == BS_USERBUTTON)