mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Fixed bug 3701 - WM_TOUCH message may cause calls to null if touch functions are not properly loaded
Simon Hug When WIN_WindowProc processes the WM_TOUCH message, it doesn't check if the touch functions have been properly loaded and may call a NULL pointer. It's probably an extremely rare case, but here's a patch that adds some checks anyway.
This commit is contained in:
parent
a47bf37464
commit
843293bed0
@ -884,7 +884,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
|
||||
case WM_TOUCH:
|
||||
{
|
||||
if (data->videodata->GetTouchInputInfo && data->videodata->CloseTouchInputHandle) {
|
||||
UINT i, num_inputs = LOWORD(wParam);
|
||||
PTOUCHINPUT inputs = SDL_stack_alloc(TOUCHINPUT, num_inputs);
|
||||
if (data->videodata->GetTouchInputInfo((HTOUCHINPUT)lParam, num_inputs, inputs, sizeof(TOUCHINPUT))) {
|
||||
|
Loading…
Reference in New Issue
Block a user