Merge branch 'fix-1241' into 'next'

Fix #1241

Closes #1241

See merge request STJr/SRB2!2481
This commit is contained in:
sphere 2024-06-19 11:51:42 +00:00
commit b68a1bfdf3

View file

@ -582,7 +582,7 @@ boolean Snake_JoyGrabber(void *opaque, event_t *ev)
{
snake_t *snake = opaque;
if (ev->type == ev_joystick && ev->key == 0)
if (snake != NULL && ev->type == ev_joystick && ev->key == 0)
{
snake->joyevents[snake->joyeventcount] = ev;
snake->joyeventcount++;