summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
Diffstat (limited to 'input')
-rw-r--r--input/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/input/input.c b/input/input.c
index fb4cb09eb3..575970bd73 100644
--- a/input/input.c
+++ b/input/input.c
@@ -1248,7 +1248,7 @@ static mp_cmd_t *read_events(int time, int paused)
int
mp_input_queue_cmd(mp_cmd_t* cmd) {
- if(cmd_queue_length >= CMD_QUEUE_SIZE)
+ if(!cmd || cmd_queue_length >= CMD_QUEUE_SIZE)
return 0;
cmd_queue[cmd_queue_end] = cmd;
cmd_queue_end = (cmd_queue_end + 1) % CMD_QUEUE_SIZE;