Do not queue empty cmd.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25256 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
ulion 2007-12-02 15:53:33 +00:00
parent 8373b55173
commit 9870aa54e3
1 changed files with 1 additions and 1 deletions

View File

@ -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;