mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 12:01:05 +00:00
Check if snake minigame is active before mapping joystick events
This commit is contained in:
parent
9ff0bea92c
commit
650f7a52a7
1 changed files with 1 additions and 1 deletions
|
@ -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++;
|
||||
|
|
Loading…
Reference in a new issue