From 9870aa54e357b882b8172f4d3ce28d63545c4761 Mon Sep 17 00:00:00 2001 From: ulion Date: Sun, 2 Dec 2007 15:53:33 +0000 Subject: [PATCH] Do not queue empty cmd. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25256 b3059339-0415-0410-9bf9-f77b7e298cf2 --- input/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;